|
42 | 42 |
|
43 | 43 | from roundup.anypy.strings import u2s, s2u |
44 | 44 |
|
45 | | -class MockDatabase(MockNull): |
| 45 | +from roundup.backends.sessions_common import SessionCommon |
| 46 | + |
| 47 | +class MockDatabase(MockNull, SessionCommon): |
46 | 48 | def getclass(self, name): |
47 | 49 | # limit class names |
48 | 50 | if name not in [ 'issue', 'user', 'status' ]: |
@@ -244,7 +246,7 @@ def test_anti_csrf_nonce(self): |
244 | 246 | '''call the csrf creation function and do basic length test |
245 | 247 |
|
246 | 248 | Store the data in a mock db with the same api as the otk |
247 | | - db. Make sure nonce is 64 chars long. Lookup the nonce in |
| 249 | + db. Make sure nonce is 54 chars long. Lookup the nonce in |
248 | 250 | db and retrieve data. Verify that the nonce lifetime is |
249 | 251 | correct (within 1 second of 1 week - lifetime), the uid is |
250 | 252 | correct (1), the dummy sid is correct. |
@@ -280,7 +282,7 @@ def test_anti_csrf_nonce(self): |
280 | 282 | # see above for web nonce lifetime. |
281 | 283 | greater_than = week_seconds - 10 * 60 |
282 | 284 |
|
283 | | - self.assertEqual(len(nonce1), 64) |
| 285 | + self.assertEqual(len(nonce1), 54) |
284 | 286 |
|
285 | 287 | uid = otks.get(nonce1, 'uid', default=None) |
286 | 288 | sid = otks.get(nonce1, 'sid', default=None) |
|
0 commit comments