def test_to_json_no_parent(self): feature = Feature(id="1", slug="web", name={"en": "Web"}) expected = { "features": { "slug": "web", "name": {"en": "Web"}, } } self.assertEqual(expected, feature.to_json_api())
def test_to_json_no_parent(self): feature = Feature(id='1', slug='web', name={'en': 'Web'}) expected = { 'features': { 'slug': 'web', 'name': {'en': 'Web'}, } } self.assertEqual(expected, feature.to_json_api())
def test_to_json_no_parent(self): feature = Feature(id='1', slug='web', name={'en': 'Web'}) expected = { 'features': { 'slug': 'web', 'name': { 'en': 'Web' }, } } self.assertEqual(expected, feature.to_json_api())
def test_to_json_null_parent(self): feature = Feature( id="1", slug="web", name={"en": "Web"}, parent=None) expected = { "features": { "slug": "web", "name": {"en": "Web"}, "links": { "parent": None } } } self.assertEqual(expected, feature.to_json_api())
def test_to_json_null_parent(self): feature = Feature( id='1', slug='web', name={'en': 'Web'}, parent=None) expected = { 'features': { 'slug': 'web', 'name': {'en': 'Web'}, 'links': { 'parent': None } } } self.assertEqual(expected, feature.to_json_api())
def test_to_json_null_parent(self): feature = Feature(id='1', slug='web', name={'en': 'Web'}, parent=None) expected = { 'features': { 'slug': 'web', 'name': { 'en': 'Web' }, 'links': { 'parent': None } } } self.assertEqual(expected, feature.to_json_api())