MCPcopy
hub / github.com/django/django / test_upgrade

Method test_upgrade

tests/auth_tests/test_hashers.py:314–325  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

312 ],
313 )
314 def test_upgrade(self):
315 self.assertEqual("pbkdf2_sha256", get_hasher("default").algorithm)
316 for algo in ("pbkdf2_sha1", "md5"):
317 with self.subTest(algo=algo):
318 encoded = make_password("lètmein", hasher=algo)
319 state = {"upgraded": False}
320
321 def setter(password):
322 state["upgraded"] = True
323
324 self.assertTrue(check_password("lètmein", encoded, setter))
325 self.assertTrue(state["upgraded"])
326
327 def test_no_upgrade(self):
328 encoded = make_password("lètmein")

Callers

nothing calls this directly

Calls 3

get_hasherFunction · 0.90
make_passwordFunction · 0.90
check_passwordFunction · 0.90

Tested by

no test coverage detected