Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pragatimodi committed Jun 12, 2023
1 parent bc6095b commit cbc0ecf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion firebase_admin/multi_factor_config_mgt.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class TOTPProviderServerConfig:
def __init__(self, data):
if not isinstance(data, dict):
raise ValueError(
'Invalid data argument in TOTPProviderServerConfig constructor: {0}'.format(data))
'Invalid data argument in TOTPProviderServerConfig'
'constructor: {0}'.format(data))
self._data = data

@property
Expand Down
6 changes: 3 additions & 3 deletions tests/test_multi_factor_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,22 @@ def test_invalid_multi_factor_config_response(self):
test_config = 'invalid'
with pytest.raises(ValueError) as excinfo:
multi_factor_config_mgt.MultiFactorServerConfig(test_config)
assert str(excinfo.value).startswith('Invalid data argument in MultiFactorConfig'
assert str(excinfo.value).startswith('Invalid data argument in MultiFactorServerConfig'
' constructor: {0}'.format(test_config))

def test_invalid_provider_config_response(self):
test_config = 'invalid'
with pytest.raises(ValueError) as excinfo:
multi_factor_config_mgt.MultiFactorServerConfig.ProviderServerConfig(test_config)
assert str(excinfo.value).startswith('Invalid data argument in ProviderConfig'
assert str(excinfo.value).startswith('Invalid data argument in ProviderServerConfig'
' constructor: {0}'.format(test_config))

def test_invalid_totp_provider_config_response(self):
test_config = 'invalid'
with pytest.raises(ValueError) as excinfo:
multi_factor_config_mgt.MultiFactorServerConfig.ProviderServerConfig.\
TOTPProviderServerConfig(test_config)
assert str(excinfo.value).startswith('Invalid data argument in TOTPProviderConfig'
assert str(excinfo.value).startswith('Invalid data argument in TOTPProviderServerConfig'
' constructor: {0}'.format(test_config))

def test_valid_server_response(self):
Expand Down

0 comments on commit cbc0ecf

Please sign in to comment.