Unit test failure message

main
Bob Mottram 2021-04-04 09:19:35 +01:00
parent 1b464fec24
commit 647004489e
1 changed files with 5 additions and 1 deletions

View File

@ -266,11 +266,15 @@ def testHttpSigNew():
domain, port,
boxpath, httpPrefix, messageBodyJsonStr,
'rsa-sha256')
assert signatureIndexHeader == \
expectedIndexHeader = \
'keyId="https://example.com/users/foo#main-key"; ' + \
'alg=hs2019; created=' + str(secondsSinceEpoch) + '; ' + \
'sig1=(*request-target, *created, host, date, ' + \
'digest, content-type, content-length)'
if signatureIndexHeader != expectedIndexHeader:
print('Unexpected http header: ' + signatureIndexHeader)
print('Should be: ' + expectedIndexHeader)
assert signatureIndexHeader == expectedIndexHeader
assert signatureHeader == \
'sig1=:LQU1PcJILSp1Q30GWINusfftYYKfTtam7InSu2c+ZzfGC' + \
'bTSevRgifZFuG2asFi8ubG/uUVHiBwIxxIz1u/JyWC3lYIFgjQF' + \