summaryrefslogtreecommitdiff
path: root/tests/test_utils
diff options
context:
space:
mode:
authorCHI Cheng <cloudream@gmail.com>2018-05-02 23:20:04 +1000
committerTim Graham <timograham@gmail.com>2018-05-02 09:35:26 -0400
commit482ba9246e1838378a7e320c247fa7338ca49b40 (patch)
treec676d1e9a5516ce413f8f59059e701392ce811d7 /tests/test_utils
parent30038300085b21fc1a8afe54a1c6e9eebbd6db47 (diff)
[2.0.x] Fixed #29375 -- Removed empty action attribute on HTML forms.
Backport of 4660ce5a6930e07899ed083801845ee4c44c09df from master
Diffstat (limited to 'tests/test_utils')
-rw-r--r--tests/test_utils/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index 80ee5a27b5..e2512920c1 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -695,15 +695,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>>''')