Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

changes `test_from_response_formname_notexists_fallback_formid` unit test for pull request #1137 - addition of new shortcut for html form election by formid attribute

mrpandav954c8fcecbd0
diff --git a/tests/test_http_request.py b/tests/test_http_request.py
index 89102016b..01a2de118 100644
--- a/tests/test_http_request.py
+++ b/tests/test_http_request.py
@@ -547,7 +547,7 @@ class FormRequestTest(RequestTest):
fs = _qs(r1)
self.assertEqual(fs, {'four': ['4'], 'three': ['3']})
- def test_from_response_formid_notexists_fallback_formname(self):
+ def test_from_response_formname_notexists_fallback_formid(self):
response = _buildresponse(
"""<form action="post.php" method="POST">
<input type="hidden" name="one" value="1">
@@ -557,7 +557,7 @@ class FormRequestTest(RequestTest):
<input type="hidden" name="three" value="3">
<input type="hidden" name="four" value="4">
</form>""")
- r1 = self.request_class.from_response(response, formid="form3", formname="form2")
+ r1 = self.request_class.from_response(response, formname="form3", formid="form2")
self.assertEqual(r1.method, 'POST')
fs = _qs(r1)
self.assertEqual(fs, {'four': ['4'], 'three': ['3']})