summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-31 07:33:13 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-31 22:05:02 +0200
commit1d6fdca557e674b9a789b51caadca8985e588492 (patch)
tree86132a2a630f06698daaed5ab869ce94c5e064f2 /tests
parentf4ac167119e8897c398527c392ed117326496652 (diff)
Refs #27468 -- Added tests and release notes for signing.dumps()/loads() changes.
Follow up to 71c4fb7beb8e3293243140e4bd74e53989196440.
Diffstat (limited to 'tests')
-rw-r--r--tests/signing/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/signing/tests.py b/tests/signing/tests.py
index 6b7268179d..76aa78fd91 100644
--- a/tests/signing/tests.py
+++ b/tests/signing/tests.py
@@ -126,6 +126,13 @@ class TestSigner(SimpleTestCase):
self.assertNotEqual(o, signing.dumps(o, compress=True))
self.assertEqual(o, signing.loads(signing.dumps(o, compress=True)))
+ def test_dumps_loads_legacy_signature(self):
+ # RemovedInDjango40Warning: pre-Django 3.1 signatures won't be
+ # supported.
+ value = 'a string \u2020'
+ signed = signing.dumps(value, algorithm='sha1')
+ self.assertEqual(signing.loads(signed), value)
+
def test_decode_detects_tampering(self):
"loads should raise exception for tampered objects"
transforms = (