def setUpClass(cls): """A class method called before tests in an individual class are run""" cls.port = find_localhost_free_port() cls.old_endpoint = get_mock_endpoint() # Start mock server start_mock_server(cls.port)
def __init__(self, method_name): cli_env = cli() super(ServiceFabricRequestTests, self).__init__(cli_env, method_name) # Save the value of SF_TEST_ENDPOINT set by the user self.old_enpoint = environ.get('SF_TEST_ENDPOINT', '') self.port = find_localhost_free_port()
def __init__(self, method_name): cli_env = cli() super(ServiceFabricRequestTests, self).__init__(cli_env, method_name) # Save the value of cluster endpoint set by the user self.old_endpoint = get_mock_endpoint() self.port = find_localhost_free_port() # Start mock server start_mock_server(self.port)