Skip to content

Commit f7e7f10

Browse files
committed
Fix loop variable name in test
1 parent 5a85f2e commit f7e7f10

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/test/test_http_cookiejar.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,20 +1946,20 @@ def test_mozilla_httponly_prefix(self):
19461946
os_helper.unlink(filename)
19471947

19481948
# Check that the HttpOnly prefix is added to the correct cookies
1949-
for value in ["foo1", "foo2", "foo3"]:
1950-
matches = [x for x in lines if value in x]
1949+
for key in ["foo1", "foo2", "foo3"]:
1950+
matches = [x for x in lines if key in x]
19511951
self.assertEqual(len(matches), 1,
1952-
"Incorrect number of matches for cookie with value %r" % value)
1952+
"Incorrect number of matches for cookie with value %r" % key)
19531953
self.assertTrue(matches[0].startswith("#HttpOnly_"),
1954-
"Cookie with value %r is missing the HttpOnly prefix" % value)
1954+
"Cookie with value %r is missing the HttpOnly prefix" % key)
19551955

19561956
# Check that the HttpOnly prefix is not added to the correct cookies
1957-
for value in ["foo4"]:
1958-
matches = [x for x in lines if value in x]
1957+
for key in ["foo4"]:
1958+
matches = [x for x in lines if key in x]
19591959
self.assertEqual(len(matches), 1,
1960-
"Incorrect number of matches for cookie with value %r" % value)
1960+
"Incorrect number of matches for cookie with value %r" % key)
19611961
self.assertFalse(matches[0].startswith("#HttpOnly_"),
1962-
"Cookie with value %r has the HttpOnly prefix" % value)
1962+
"Cookie with value %r has the HttpOnly prefix" % key)
19631963

19641964
def test_netscape_misc(self):
19651965
# Some additional Netscape cookies tests.

0 commit comments

Comments
 (0)