Mercurial > p > roundup > code
diff test/test_userauditor.py @ 6237:0a37979bbd46
Verify , in username invalid; fix broken test
self.assertEqual was inside context hander. Should be outside.
So the test case wasn't actualy being checked.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 28 Jul 2020 05:51:00 -0400 |
| parents | 5148e46dd314 |
| children | 89aa919997c0 |
line wrap: on
line diff
--- a/test/test_userauditor.py Sun Jul 26 12:25:20 2020 -0400 +++ b/test/test_userauditor.py Tue Jul 28 05:51:00 2020 -0400 @@ -107,14 +107,14 @@ ValueError: Username/Login Name must consist only of the letters a-z (any case), digits 0-9 and the symbols: @._-!+% ''' - for name in [ "ky'le", "ky<br>le" ]: + for name in [ "ky'le", "ky<br>le", "ky,le" ]: with self.assertRaises(ValueError) as ctx: self.db.user.create(username=name, address='kyle@example.com', realname='Kyle Broflovski', roles='User') - self.assertEqual(str(ctx.exception), "Username/Login Name must " + self.assertEqual(str(ctx.exception), "Username/Login Name must " "consist only of the letters a-z (any case), " - "digits 0-9 and the symbols: @._-!%") + "digits 0-9 and the symbols: @._-!+%") self.db.user.create(username='rouilj-1+mya_ddr@users.example.com', address='kyle1@example.com',
