diff --git a/monkey/monkey_island/cc/environment/__init__.py b/monkey/monkey_island/cc/environment/__init__.py index 3e70602c7..bb9f8e775 100644 --- a/monkey/monkey_island/cc/environment/__init__.py +++ b/monkey/monkey_island/cc/environment/__init__.py @@ -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): diff --git a/monkey/tests/unit_tests/monkey_island/cc/environment/test_environment.py b/monkey/tests/unit_tests/monkey_island/cc/environment/test_environment.py index 746954880..5fd0d2cda 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/environment/test_environment.py +++ b/monkey/tests/unit_tests/monkey_island/cc/environment/test_environment.py @@ -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 ):