diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-07-26 12:58:04 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-07-27 13:08:15 +0200 |
commit | a8287fbdee4a75f1a8bd54f0c9072bc637242e03 (patch) | |
tree | a3147fe1c2821bf610f7d2678aabcc19ce4b8d3a /xtesting/tests | |
parent | 0017cfbd5687334e72a228eafc0ba33e54835db5 (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>
Diffstat (limited to 'xtesting/tests')
-rw-r--r-- | xtesting/tests/unit/core/test_feature.py | 1 | ||||
-rw-r--r-- | xtesting/tests/unit/core/test_testcase.py | 1 | ||||
-rw-r--r-- | xtesting/tests/unit/energy/test_functest_energy.py | 14 |
3 files changed, 9 insertions, 7 deletions
diff --git a/xtesting/tests/unit/core/test_feature.py b/xtesting/tests/unit/core/test_feature.py index 30678798..785f6e16 100644 --- a/xtesting/tests/unit/core/test_feature.py +++ b/xtesting/tests/unit/core/test_feature.py @@ -29,6 +29,7 @@ class FakeTestCase(feature.Feature): class AbstractFeatureTesting(unittest.TestCase): def test_run_unimplemented(self): + # pylint: disable=abstract-class-instantiated with self.assertRaises(TypeError): feature.Feature(case_name="feature", project_name="xtesting") diff --git a/xtesting/tests/unit/core/test_testcase.py b/xtesting/tests/unit/core/test_testcase.py index 51ea6f35..fc612973 100644 --- a/xtesting/tests/unit/core/test_testcase.py +++ b/xtesting/tests/unit/core/test_testcase.py @@ -35,6 +35,7 @@ class FakeTestCase(testcase.TestCase): class AbstractTestCaseTesting(unittest.TestCase): def test_run_unimplemented(self): + # pylint: disable=abstract-class-instantiated with self.assertRaises(TypeError): testcase.TestCase(case_name="base", project_name="xtesting") 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) |