Island: Remove disused Environment class

This commit is contained in:
Mike Salvatore 2021-11-19 08:41:42 -05:00
parent 38a898824a
commit 69cbf3ff50
3 changed files with 0 additions and 47 deletions

View File

@ -1,5 +0,0 @@
from enum import Enum
class Environment(Enum):
AWS = "AWS"

View File

@ -1,26 +0,0 @@
import logging
from abc import ABCMeta, abstractmethod
from datetime import timedelta
from common.utils.exceptions import (
AlreadyRegisteredError,
InvalidRegistrationCredentialsError,
)
from monkey_island.cc.environment.environment_config import EnvironmentConfig
logger = logging.getLogger(__name__)
class Environment(object, metaclass=ABCMeta):
_testing = False
def __init__(self, config: EnvironmentConfig):
self._testing = False # Assume env is not for unit testing.
@property
def testing(self):
return self._testing
@testing.setter
def testing(self, value):
self._testing = value

View File

@ -1,16 +0,0 @@
from typing import Dict
from unittest import TestCase
from monkey_island.cc.environment import Environment, EnvironmentConfig
class TestEnvironment(TestCase):
def _test_bool_env_method(
self, method_name: str, env: Environment, config: Dict, expected_result: bool
):
env._config = EnvironmentConfig(config)
method = getattr(env, method_name)
if expected_result:
self.assertTrue(method())
else:
self.assertFalse(method())