From 0fa239da110a10c69266a21e821472955f00a34e Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Mon, 19 Dec 2022 10:42:31 +0100 Subject: [PATCH] These tests are not required anymore --- core/base/libs/socrate/test.py | 35 ---------------------------------- 1 file changed, 35 deletions(-) diff --git a/core/base/libs/socrate/test.py b/core/base/libs/socrate/test.py index f6088345..03977685 100644 --- a/core/base/libs/socrate/test.py +++ b/core/base/libs/socrate/test.py @@ -78,40 +78,5 @@ class TestSystem(unittest.TestCase): "2001:db8::f00" ) - - def test_resolve_address(self): - self.assertEqual( - system.resolve_address("1.2.3.4.sslip.io:80"), - "1.2.3.4:80" - ) - self.assertEqual( - system.resolve_address("2001-db8--f00.sslip.io:80"), - "[2001:db8::f00]:80" - ) - - def test_get_host_address_from_environment(self): - if "TEST_ADDRESS" in os.environ: - del os.environ["TEST_ADDRESS"] - if "HOST_TEST" in os.environ: - del os.environ["HOST_TEST"] - # if nothing is set, the default must be resolved - self.assertEqual( - system.get_host_address_from_environment("TEST", "1.2.3.4.sslip.io:80"), - "1.2.3.4:80" - ) - # if HOST is set, the HOST must be resolved - os.environ['HOST_TEST']="1.2.3.5.sslip.io:80" - self.assertEqual( - system.get_host_address_from_environment("TEST", "1.2.3.4.sslip.io:80"), - "1.2.3.5:80" - ) - # if ADDRESS is set, the ADDRESS must be returned unresolved - os.environ['TEST_ADDRESS']="1.2.3.6.sslip.io:80" - self.assertEqual( - system.get_host_address_from_environment("TEST", "1.2.3.4.sslip.io:80"), - "1.2.3.6.sslip.io:80" - ) - - if __name__ == "__main__": unittest.main()