From 0b7d96f48c9035ad7b5f39eabaa6e6042825730a Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Feb 2021 18:27:04 +0000 Subject: [PATCH] Tidying --- tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests.py b/tests.py index 0256d0d95..02fe2b604 100644 --- a/tests.py +++ b/tests.py @@ -217,10 +217,11 @@ def testHttpSigNew(): # "Signature": sig # } dateStr = "Tue, 07 Jun 2014 20:51:35 GMT" + secondsSinceEpoch = 1402170695 domain = "example.com" port = 443 headers = { - "*created": "1402170695", + "*created": str(secondsSinceEpoch), "*request-target": "post /foo?param=value&pet=dog", "host": domain, "date": dateStr, @@ -260,7 +261,7 @@ def testHttpSigNew(): 'rsa-sha256') assert signatureIndexHeader == \ 'keyId="https://example.com/users/foo#main-key"; ' + \ - 'alg=hs2019; created=1402170695; ' + \ + 'alg=hs2019; created=' + str(secondsSinceEpoch) + '; ' + \ 'sig1=(*request-target, *created, host, date, ' + \ 'digest, content-type, content-length)' assert signatureHeader == \