Пример #1
0
 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())
Пример #2
0
 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())
Пример #3
0
 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())
Пример #4
0
 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())
Пример #5
0
 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())
Пример #6
0
 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())
Пример #7
0
 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())
Пример #8
0
 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())