def test_get_evergreen_server(self): api_server_host = "https://myevergreen.com" evg_config = {"api_server_host": api_server_host} with patch(EVERGREEN + ".read_evg_config", return_value=evg_config): api_server = evergreen.get_evergreen_server() self.assertEqual(api_server_host, api_server)
def test_get_evergreen_server_other_data(self): evg_config = {"api_server_host_bad": "bad"} with patch(EVERGREEN + ".read_evg_config", return_value=evg_config): api_server = evergreen.get_evergreen_server() self.assertEqual(evergreen.DEFAULT_API_SERVER, api_server)
def test_get_evergreen_server_default(self): evg_config = {} with patch(EVERGREEN + ".read_evg_config", return_value=evg_config): api_server = evergreen.get_evergreen_server() self.assertEqual(evergreen.DEFAULT_API_SERVER, api_server)