diff --git a/tests/auth_tests/test_hashers.py b/tests/auth_tests/test_hashers.py index 01b1e354391..5ca422764bc 100644 --- a/tests/auth_tests/test_hashers.py +++ b/tests/auth_tests/test_hashers.py @@ -514,6 +514,12 @@ class TestUtilsHashPassArgon2(SimpleTestCase): ) self.assertTrue(check_password('secret', encoded)) self.assertFalse(check_password('wrong', encoded)) + # Old hashes with version attribute. + encoded = ( + 'argon2$argon2i$v=19$m=8,t=1,p=1$c2FsdHNhbHQ$YC9+jJCrQhs5R6db7LlN8Q' + ) + self.assertIs(check_password('secret', encoded), True) + self.assertIs(check_password('wrong', encoded), False) def test_argon2_upgrade(self): self._test_argon2_upgrade('time_cost', 'time cost', 1)