1
1
# file to handle loading and parsing of mauth protocol test suite cases in order
2
2
# to run them as unit tests
3
3
4
- from datetime import datetime
4
+ from datetime import datetime , timezone
5
5
import glob
6
6
import os
7
7
import json
@@ -29,7 +29,7 @@ def __init__(self):
29
29
with open (os .path .join (MAUTH_PROTOCOL_DIR , "signing-params/rsa-key-pub" ), "r" ) as key_file :
30
30
self .public_key = key_file .read ()
31
31
32
- self .request_time = datetime .fromtimestamp (float (config ["request_time" ]))
32
+ self .request_time = datetime .fromtimestamp (float (config ["request_time" ]), timezone . utc )
33
33
self .app_uuid = config ["app_uuid" ]
34
34
self .signer = Signer (config ["app_uuid" ], private_key , "v2" )
35
35
self .additional_attributes = {"app_uuid" : config ["app_uuid" ], "time" : config ["request_time" ]}
@@ -44,7 +44,7 @@ def __init__(self, case_path):
44
44
self .request_attributes = self .build_request_attributes (case_path )
45
45
self .sts = self .read_file_by_extension (case_path , "sts" )
46
46
self .sig = self .read_file_by_extension (case_path , "sig" )
47
- self .auth_headers = self .read_json_by_extension (case_path , "authz" )
47
+ self .auth_headers = { k : str ( v ) for k , v in self .read_json_by_extension (case_path , "authz" ). items ()}
48
48
49
49
def build_request_attributes (self , case_path ):
50
50
req = self .read_json_by_extension (case_path , "req" )
0 commit comments