Mercurial > p > roundup > code
diff test/test_admin.py @ 8244:b4ad03927711
test: fix failing test setup for change in PBKDF2 rounds.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 30 Dec 2024 21:03:01 -0500 |
| parents | c12377fb4144 |
| children | 1a93dc58f975 |
line wrap: on
line diff
--- a/test/test_admin.py Mon Dec 30 20:54:46 2024 -0500 +++ b/test/test_admin.py Mon Dec 30 21:03:01 2024 -0500 @@ -692,7 +692,8 @@ ### test replacement of old default value replace_in_file(self.dirname + "/config.ini", - "= 2000000", "= 10000") + "= 250000", "= 10000") + with captured_output() as (out, err): sys.argv=['main', '-i', self.dirname, 'update', self.dirname + "/config2.ini"] @@ -700,13 +701,13 @@ out = out.getvalue().strip() print(out) - expected = "from old default of 10000 to new default of 2000000." + expected = "from old default of 10000 to new default of 250000." self.assertIn(expected, out) self.assertTrue(os.path.isfile(self.dirname + "/config2.ini")) self.assertEqual(find_in_file(self.dirname + "/config2.ini", - "^password_.*= 2000000$"), - "password_pbkdf2_default_rounds = 2000000") + "^password_.*= 250000$"), + "password_pbkdf2_default_rounds = 250000") # Reopen the db closed by previous call self.admin=AdminTool() @@ -722,7 +723,7 @@ out = out.getvalue().strip() print(out) expected = ("Update 'password_pbkdf2_default_rounds' to a number " - "equal to or larger\n than 2000000.") + "equal to or larger\n than 250000.") self.assertIn(expected, out) self.assertTrue(os.path.isfile(self.dirname + "/config2.ini"))
