def test_it(self): field = self._call_fut('value') assert "'value'" == field.to_value() assert "'value'" == str(field) field = self._call_fut('value', 'name') assert "name:'value'" == field.to_value() assert "name:'value'" == str(field) field = self._call_fut({'name': 'value'}) assert "name:'value'" == field.to_value() assert "name:'value'" == str(field)
def test_to_value(self): field = self._make_one('test') assert "'test'" == field.to_value() assert "'test'" == str(field) field = self._make_one('test', 'name') assert "name:'test'" == field.to_value() assert "name:'test'" == str(field) field = self._make_one({'name': 'test'}) assert "name:'test'" == field.to_value() assert "name:'test'" == str(field)