forked from p34709852/monkey
Island: Remove _is_credentials_set_up() from Environment
This commit is contained in:
parent
caa62c6272
commit
6bdba71b69
|
@ -50,13 +50,7 @@ class Environment(object, metaclass=ABCMeta):
|
|||
return True
|
||||
|
||||
def _is_registered(self) -> bool:
|
||||
return self._is_credentials_set_up()
|
||||
|
||||
def _is_credentials_set_up(self) -> bool:
|
||||
if self._config and self._config.user_creds:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return self._config and self._config.user_creds
|
||||
|
||||
@property
|
||||
def testing(self):
|
||||
|
|
|
@ -93,12 +93,6 @@ class TestEnvironment(TestCase):
|
|||
self._test_bool_env_method("_is_registered", env, NO_CREDENTIALS, False)
|
||||
self._test_bool_env_method("_is_registered", env, PARTIAL_CREDENTIALS, False)
|
||||
|
||||
def test_is_credentials_set_up(self):
|
||||
env = TestEnvironment.EnvironmentCredentialsRequired()
|
||||
self._test_bool_env_method("_is_credentials_set_up", env, NO_CREDENTIALS, False)
|
||||
self._test_bool_env_method("_is_credentials_set_up", env, WITH_CREDENTIALS, True)
|
||||
self._test_bool_env_method("_is_credentials_set_up", env, PARTIAL_CREDENTIALS, False)
|
||||
|
||||
def _test_bool_env_method(
|
||||
self, method_name: str, env: Environment, config: Dict, expected_result: bool
|
||||
):
|
||||
|
|
Loading…
Reference in New Issue