Skip to content

Commit 6329495

Browse files
committed
Fix loop variable name in test
1 parent 028b607 commit 6329495

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
@@ -1957,20 +1957,20 @@ def test_mozilla_httponly_prefix(self):
19571957
os_helper.unlink(filename)
19581958

19591959
# Check that the HttpOnly prefix is added to the correct cookies
1960-
for value in ["foo1", "foo2", "foo3"]:
1961-
matches = [x for x in lines if value in x]
1960+
for key in ["foo1", "foo2", "foo3"]:
1961+
matches = [x for x in lines if key in x]
19621962
self.assertEqual(len(matches), 1,
1963-
"Incorrect number of matches for cookie with value %r" % value)
1963+
"Incorrect number of matches for cookie with value %r" % key)
19641964
self.assertTrue(matches[0].startswith("#HttpOnly_"),
1965-
"Cookie with value %r is missing the HttpOnly prefix" % value)
1965+
"Cookie with value %r is missing the HttpOnly prefix" % key)
19661966

19671967
# Check that the HttpOnly prefix is not added to the correct cookies
1968-
for value in ["foo4"]:
1969-
matches = [x for x in lines if value in x]
1968+
for key in ["foo4"]:
1969+
matches = [x for x in lines if key in x]
19701970
self.assertEqual(len(matches), 1,
1971-
"Incorrect number of matches for cookie with value %r" % value)
1971+
"Incorrect number of matches for cookie with value %r" % key)
19721972
self.assertFalse(matches[0].startswith("#HttpOnly_"),
1973-
"Cookie with value %r has the HttpOnly prefix" % value)
1973+
"Cookie with value %r has the HttpOnly prefix" % key)
19741974

19751975
def test_netscape_misc(self):
19761976
# Some additional Netscape cookies tests.

0 commit comments

Comments
 (0)