mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
fix unit tests to handle form_pages being a paginator.Page instance
This commit is contained in:
parent
7b98664cd0
commit
3e152e0386
@ -38,14 +38,14 @@ class TestFormsBackend(TestCase):
|
||||
|
||||
self.client.login(username='eventeditor', password='password')
|
||||
response = self.client.get('/admin/forms/')
|
||||
self.assertFalse(response.context['form_pages'].filter(id=form_page.id).exists())
|
||||
self.assertFalse(form_page in response.context['form_pages'])
|
||||
|
||||
def test_can_see_forms_with_permission(self):
|
||||
form_page = Page.objects.get(url_path='/home/contact-us/')
|
||||
|
||||
self.client.login(username='siteeditor', password='password')
|
||||
response = self.client.get('/admin/forms/')
|
||||
self.assertTrue(response.context['form_pages'].filter(id=form_page.id).exists())
|
||||
self.assertTrue(form_page in response.context['form_pages'])
|
||||
|
||||
def test_can_get_submissions(self):
|
||||
form_page = Page.objects.get(url_path='/home/contact-us/')
|
||||
|
Loading…
Reference in New Issue
Block a user