Refs #27468 -- Fixed TestSigner.test_dumps_loads_legacy_signature.

Added in 1d6fdca557.
This commit is contained in:
Mariusz Felisiak 2020-08-01 20:39:18 +02:00 committed by GitHub
parent 1d6fdca557
commit 7c929fcf7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -130,7 +130,8 @@ class TestSigner(SimpleTestCase):
# RemovedInDjango40Warning: pre-Django 3.1 signatures won't be # RemovedInDjango40Warning: pre-Django 3.1 signatures won't be
# supported. # supported.
value = 'a string \u2020' value = 'a string \u2020'
signed = signing.dumps(value, algorithm='sha1') # SHA-1 signed value.
signed = 'ImEgc3RyaW5nIFx1MjAyMCI:1k1beT:ZfNhN1kdws7KosUleOvuYroPHEc'
self.assertEqual(signing.loads(signed), value) self.assertEqual(signing.loads(signed), value)
def test_decode_detects_tampering(self): def test_decode_detects_tampering(self):