summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-08-20 16:43:31 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-08-20 16:46:45 -0300
commitec7a9bf80e2a0c2c9dc1c160c065524d1e1d6b95 (patch)
tree596af8323b1997dd536133d69dc43bb47e2a2c16
parent2a87d0d57d5fe663f814eb3dae90168c594babb5 (diff)
Improve test coverage for VPNGatewaySelector.
-rw-r--r--src/leap/bitmask/services/eip/tests/test_vpngatewayselector.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/leap/bitmask/services/eip/tests/test_vpngatewayselector.py b/src/leap/bitmask/services/eip/tests/test_vpngatewayselector.py
index f9a177a9..36f8a076 100644
--- a/src/leap/bitmask/services/eip/tests/test_vpngatewayselector.py
+++ b/src/leap/bitmask/services/eip/tests/test_vpngatewayselector.py
@@ -19,6 +19,7 @@ tests for vpngatewayselector
"""
import unittest
+import time
from leap.bitmask.services.eip.eipconfig import EIPConfig, VPNGatewaySelector
from leap.common.testing.basetest import BaseLeapTest
@@ -128,5 +129,19 @@ class VPNGatewaySelectorTest(BaseLeapTest):
self.assertEqual(gateways, [ips[4], ips[2], ips[3], ips[1]])
+class VPNGatewaySelectorDSTTest(VPNGatewaySelectorTest):
+ """
+ VPNGatewaySelector's tests.
+ It uses the opposite value of the current DST.
+ """
+ def setUp(self):
+ self._original_daylight = time.daylight
+ time.daylight = not time.daylight
+ VPNGatewaySelectorTest.setUp(self)
+
+ def tearDown(self):
+ VPNGatewaySelectorTest.tearDown(self)
+ time.daylight = self._original_daylight
+
if __name__ == "__main__":
unittest.main()