aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit/energy
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-07-26 12:58:04 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-07-27 13:10:37 +0200
commitbe7d878331dfbe993e1dd2a250f5fdfd219579dd (patch)
tree1f90b078859ed0196eee74ef0a0617f0b2f05e34 /xtesting/tests/unit/energy
parentc1dc3cc138eaeb1dfaf421bf4a6727bb1d51e681 (diff)
Enable py36 unit tests
It benefits from the swith to lf-virtual1. Change-Id: I9f99f24a5e3c8ef6374e049d7117aa7d5aa4d442 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit a8287fbdee4a75f1a8bd54f0c9072bc637242e03)
Diffstat (limited to 'xtesting/tests/unit/energy')
-rw-r--r--xtesting/tests/unit/energy/test_functest_energy.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/xtesting/tests/unit/energy/test_functest_energy.py b/xtesting/tests/unit/energy/test_functest_energy.py
index ea83c1ea..826e0d99 100644
--- a/xtesting/tests/unit/energy/test_functest_energy.py
+++ b/xtesting/tests/unit/energy/test_functest_energy.py
@@ -287,11 +287,11 @@ class EnergyRecorderTest(unittest.TestCase):
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["auth"],
("user", "password")
)
- self.assertEquals(
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["uri"],
"http://pod-uri:8888/recorders/environment/MOCK_POD"
)
@@ -304,8 +304,8 @@ class EnergyRecorderTest(unittest.TestCase):
self._set_env_nocreds()
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api["auth"], None)
- self.assertEquals(
+ self.assertEqual(EnergyRecorder.energy_recorder_api["auth"], None)
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["uri"],
"http://pod-uri:8888/recorders/environment/MOCK_POD"
)
@@ -319,7 +319,7 @@ class EnergyRecorderTest(unittest.TestCase):
with self.assertRaises(AssertionError):
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api, None)
+ self.assertEqual(EnergyRecorder.energy_recorder_api, None)
@mock.patch("xtesting.energy.energy.requests.get",
return_value=API_KO)
@@ -329,8 +329,8 @@ class EnergyRecorderTest(unittest.TestCase):
self._set_env_creds()
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api["available"],
- False)
+ self.assertEqual(EnergyRecorder.energy_recorder_api["available"],
+ False)
@mock.patch('xtesting.energy.energy.requests.get',
return_value=RECORDER_OK)