kopia lustrzana https://github.com/wagtail/wagtail
Fixed admin API tests
rodzic
7e160edad6
commit
141c1d6568
|
@ -138,7 +138,7 @@ class TestAdminPageListing(AdminAPITestCase, TestPageListing):
|
||||||
content = json.loads(response.content.decode('UTF-8'))
|
content = json.loads(response.content.decode('UTF-8'))
|
||||||
|
|
||||||
for page in content['items']:
|
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'})
|
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):
|
def test_all_fields_then_remove_something(self):
|
||||||
|
@ -146,7 +146,7 @@ class TestAdminPageListing(AdminAPITestCase, TestPageListing):
|
||||||
content = json.loads(response.content.decode('UTF-8'))
|
content = json.loads(response.content.decode('UTF-8'))
|
||||||
|
|
||||||
for page in content['items']:
|
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'})
|
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):
|
def test_all_nested_fields(self):
|
||||||
|
@ -413,6 +413,7 @@ class TestAdminPageDetail(AdminAPITestCase, TestPageDetail):
|
||||||
'tags',
|
'tags',
|
||||||
'date',
|
'date',
|
||||||
'feed_image',
|
'feed_image',
|
||||||
|
'feed_image_thumbnail',
|
||||||
'carousel_items',
|
'carousel_items',
|
||||||
'related_links',
|
'related_links',
|
||||||
'__types',
|
'__types',
|
||||||
|
|
Ładowanie…
Reference in New Issue