From d69976caa5070403f81799c79be974241cff7f70 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 30 Aug 2012 03:43:05 +0900 Subject: fetcher moved to baseconfig + eipchecker using eipservice config. --- src/leap/eip/tests/data.py | 8 -------- src/leap/eip/tests/test_checks.py | 9 +++++---- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'src/leap/eip/tests') diff --git a/src/leap/eip/tests/data.py b/src/leap/eip/tests/data.py index 9067c270..284b398f 100644 --- a/src/leap/eip/tests/data.py +++ b/src/leap/eip/tests/data.py @@ -38,13 +38,5 @@ EIP_SAMPLE_SERVICE = { "label": {"en":"west"}, "capabilities": {}, "hosts": ["1.2.3.4", "1.2.3.5"]}, - {"country_code": "us", - "label": {"en":"east"}, - "capabilities": {}, - "hosts": ["1.2.3.4", "1.2.3.5"]}, - {"country_code": "fr", - "label": {}, - "capabilities": {}, - "hosts": ["1.2.3.4", "1.2.3.5"]} ] } diff --git a/src/leap/eip/tests/test_checks.py b/src/leap/eip/tests/test_checks.py index 5697ad10..1e629203 100644 --- a/src/leap/eip/tests/test_checks.py +++ b/src/leap/eip/tests/test_checks.py @@ -40,7 +40,8 @@ class EIPCheckTest(BaseLeapTest): self.assertTrue(hasattr(checker, "check_is_there_default_provider"), "missing meth") self.assertTrue(hasattr(checker, "fetch_definition"), "missing meth") - self.assertTrue(hasattr(checker, "fetch_eip_config"), "missing meth") + self.assertTrue(hasattr(checker, "fetch_eip_service_config"), + "missing meth") self.assertTrue(hasattr(checker, "check_complete_eip_config"), "missing meth") self.assertTrue(hasattr(checker, "ping_gateway"), "missing meth") @@ -55,7 +56,7 @@ class EIPCheckTest(BaseLeapTest): "not called") self.assertTrue(mc.fetch_definition.called, "not called") - self.assertTrue(mc.fetch_eip_config.called, + self.assertTrue(mc.fetch_eip_service_config.called, "not called") self.assertTrue(mc.check_complete_eip_config.called, "not called") @@ -133,13 +134,13 @@ class EIPCheckTest(BaseLeapTest): # (and proper EIPExceptions are raised). # Look at base.test_config. - def test_fetch_eip_config(self): + def test_fetch_eip_service_config(self): with patch.object(requests, "get") as mocked_get: mocked_get.return_value.status_code = 200 mocked_get.return_value.json = testdata.EIP_SAMPLE_SERVICE checker = eipchecks.EIPConfigChecker(fetcher=requests) sampleconfig = testdata.EIP_SAMPLE_JSON - checker.fetch_definition(config=sampleconfig) + checker.fetch_eip_service_config(config=sampleconfig) def test_check_complete_eip_config(self): checker = eipchecks.EIPConfigChecker() -- cgit v1.2.3