def test_osm_field_with_args(self): field = OSMField(lat_field="some_lat_field", lon_field="some_lon_field") field.set_attributes_from_name("location") name, path, args, kwargs = field.deconstruct() self.assertEqual(name, "location") self.assertEqual(path, "osm_field.fields.OSMField") self.assertEqual(args, []) self.assertEqual( kwargs, {"lat_field": "some_lat_field", "lon_field": "some_lon_field"} )
def test_osm_field_with_args(self): field = OSMField(lat_field='some_lat_field', lon_field='some_lon_field') field.set_attributes_from_name("location") name, path, args, kwargs = field.deconstruct() self.assertEqual(name, 'location') self.assertEqual(path, 'osm_field.fields.OSMField') self.assertEqual(args, []) self.assertEqual(kwargs, { 'lat_field': 'some_lat_field', 'lon_field': 'some_lon_field', })