11# file to handle loading and parsing of mauth protocol test suite cases in order
22# to run them as unit tests
33
4- from datetime import datetime
4+ from datetime import datetime , timezone
55import glob
66import os
77import json
@@ -29,7 +29,7 @@ def __init__(self):
2929 with open (os .path .join (MAUTH_PROTOCOL_DIR , "signing-params/rsa-key-pub" ), "r" ) as key_file :
3030 self .public_key = key_file .read ()
3131
32- self .request_time = datetime .fromtimestamp (float (config ["request_time" ]))
32+ self .request_time = datetime .fromtimestamp (float (config ["request_time" ]), timezone . utc )
3333 self .app_uuid = config ["app_uuid" ]
3434 self .signer = Signer (config ["app_uuid" ], private_key , "v2" )
3535 self .additional_attributes = {"app_uuid" : config ["app_uuid" ], "time" : config ["request_time" ]}
@@ -44,7 +44,7 @@ def __init__(self, case_path):
4444 self .request_attributes = self .build_request_attributes (case_path )
4545 self .sts = self .read_file_by_extension (case_path , "sts" )
4646 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 ()}
4848
4949 def build_request_attributes (self , case_path ):
5050 req = self .read_json_by_extension (case_path , "req" )
0 commit comments