mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Fixed #29375 -- Removed empty action attribute on HTML forms.
This commit is contained in:
parent
c02953ebbc
commit
4660ce5a69
9 changed files with 36 additions and 36 deletions
|
|
@ -691,15 +691,15 @@ class HTMLEqualTests(SimpleTestCase):
|
|||
|
||||
def test_contains_html(self):
|
||||
response = HttpResponse('''<body>
|
||||
This is a form: <form action="" method="get">
|
||||
This is a form: <form method="get">
|
||||
<input type="text" name="Hello" />
|
||||
</form></body>''')
|
||||
|
||||
self.assertNotContains(response, "<input name='Hello' type='text'>")
|
||||
self.assertContains(response, '<form action="" method="get">')
|
||||
self.assertContains(response, '<form method="get">')
|
||||
|
||||
self.assertContains(response, "<input name='Hello' type='text'>", html=True)
|
||||
self.assertNotContains(response, '<form action="" method="get">', html=True)
|
||||
self.assertNotContains(response, '<form method="get">', html=True)
|
||||
|
||||
invalid_response = HttpResponse('''<body <bad>>''')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue