@@ -64,7 +64,7 @@ def test_creating_client_instance_without_private_key_file():
64
64
def test_creating_client_instance_with_invalid_key_file_arg (key_file ):
65
65
with pytest .raises (RuntimeError ) as exc :
66
66
Client (YOTI_CLIENT_SDK_ID , key_file )
67
- expected_error = 'Invalid private key file argument specified in Client() '
67
+ expected_error = 'Could not read private key file'
68
68
assert expected_error in str (exc )
69
69
assert str (key_file ) in str (exc )
70
70
@@ -74,9 +74,10 @@ def test_creating_client_instance_with_invalid_key_file_env(key_file):
74
74
environ ['YOTI_KEY_FILE_PATH' ] = str (key_file )
75
75
with pytest .raises (RuntimeError ) as exc :
76
76
Client (YOTI_CLIENT_SDK_ID )
77
- expected_error = 'Invalid private key file specified by the ' \
78
- ' YOTI_KEY_FILE_PATH env variable'
77
+ expected_error = 'Could not read private key file'
78
+ expected_error_source = 'specified by the YOTI_KEY_FILE_PATH env variable'
79
79
assert expected_error in str (exc )
80
+ assert expected_error_source in str (exc )
80
81
assert str (key_file ) in str (exc )
81
82
82
83
@@ -89,7 +90,7 @@ def test_creating_client_instance_with_valid_key_file_env_but_invalid_key_file_a
89
90
environ ['YOTI_KEY_FILE_PATH' ] = PEM_FILE_PATH
90
91
with pytest .raises (RuntimeError ) as exc :
91
92
Client (YOTI_CLIENT_SDK_ID , INVALID_KEY_FILE_PATH )
92
- expected_error = 'Invalid private key file argument specified in Client() '
93
+ expected_error = 'Could not read private key file'
93
94
assert expected_error in str (exc )
94
95
assert str (INVALID_KEY_FILE_PATH ) in str (exc )
95
96
0 commit comments