mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 01:03:11 +00:00
Removed page modes tests
These views were already being tested in TestFormSubmission. I don't think anyone will ever call the modes directly making these tests a bit pointless. They also use the assertTemplateUsed method badly (these should be used on a response).
This commit is contained in:
parent
80cb6e16e7
commit
af7c1de978
1 changed files with 0 additions and 23 deletions
|
|
@ -79,29 +79,6 @@ class TestFormSubmission(TestCase):
|
|||
self.assertIn("baz", submission[0].form_data)
|
||||
|
||||
|
||||
class TestPageModes(TestCase):
|
||||
fixtures = ['test.json']
|
||||
|
||||
def setUp(self):
|
||||
self.form_page = Page.objects.get(url_path='/home/contact-us/').specific
|
||||
|
||||
def test_form(self):
|
||||
response = self.form_page.serve_preview(self.form_page.dummy_request(), 'form')
|
||||
|
||||
# Check response
|
||||
self.assertContains(response, """<label for="id_your-email">Your email</label>""")
|
||||
self.assertTemplateUsed(response, 'tests/form_page.html')
|
||||
self.assertTemplateNotUsed(response, 'tests/form_page_landing.html')
|
||||
|
||||
def test_landing(self):
|
||||
response = self.form_page.serve_preview(self.form_page.dummy_request(), 'landing')
|
||||
|
||||
# Check response
|
||||
self.assertContains(response, "Thank you for your feedback.")
|
||||
self.assertTemplateNotUsed(response, 'tests/form_page.html')
|
||||
self.assertTemplateUsed(response, 'tests/form_page_landing.html')
|
||||
|
||||
|
||||
class TestFormBuilder(TestCase):
|
||||
fixtures = ['test.json']
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue