Fixed admin API tests

pull/3462/head
Karl Hobley 2017-04-06 15:21:43 +01:00
rodzic 7e160edad6
commit 141c1d6568
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -138,7 +138,7 @@ class TestAdminPageListing(AdminAPITestCase, TestPageListing):
content = json.loads(response.content.decode('UTF-8'))
for page in content['items']:
self.assertEqual(set(page.keys()), {'id', 'meta', 'title', 'date', 'related_links', 'tags', 'carousel_items', 'body', 'feed_image'})
self.assertEqual(set(page.keys()), {'id', 'meta', 'title', 'date', 'related_links', 'tags', 'carousel_items', 'body', 'feed_image', 'feed_image_thumbnail'})
self.assertEqual(set(page['meta'].keys()), {'type', 'detail_url', 'show_in_menus', 'first_published_at', 'seo_title', 'slug', 'parent', 'html_url', 'search_description', 'children', 'descendants', 'status', 'latest_revision_created_at'})
def test_all_fields_then_remove_something(self):
@ -146,7 +146,7 @@ class TestAdminPageListing(AdminAPITestCase, TestPageListing):
content = json.loads(response.content.decode('UTF-8'))
for page in content['items']:
self.assertEqual(set(page.keys()), {'id', 'meta', 'related_links', 'tags', 'carousel_items', 'body', 'feed_image'})
self.assertEqual(set(page.keys()), {'id', 'meta', 'related_links', 'tags', 'carousel_items', 'body', 'feed_image', 'feed_image_thumbnail'})
self.assertEqual(set(page['meta'].keys()), {'type', 'detail_url', 'show_in_menus', 'first_published_at', 'slug', 'parent', 'html_url', 'search_description', 'children', 'descendants', 'latest_revision_created_at'})
def test_all_nested_fields(self):
@ -413,6 +413,7 @@ class TestAdminPageDetail(AdminAPITestCase, TestPageDetail):
'tags',
'date',
'feed_image',
'feed_image_thumbnail',
'carousel_items',
'related_links',
'__types',