0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

Fix label escaping test to account for #6093

This commit is contained in:
Matt Westcott 2020-07-20 11:49:43 +01:00
parent b98d724def
commit 7b5c064a19

View File

@ -44,7 +44,7 @@ class TestFormSubmission(TestCase):
def test_label_escaping(self):
FormField.objects.filter(label="Your message").update(label="Your <em>wonderful</em> message")
response = self.client.get('/contact-us/')
self.assertContains(response, """<label for="id_your-emwonderfulem-message">Your &lt;em&gt;wonderful&lt;/em&gt; message</label>""")
self.assertContains(response, """<label for="id_your_message">Your &lt;em&gt;wonderful&lt;/em&gt; message</label>""")
def test_post_invalid_form(self):
response = self.client.post('/contact-us/', {