aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'xtesting/tests/unit')
-rw-r--r--xtesting/tests/unit/core/test_feature.py1
-rw-r--r--xtesting/tests/unit/core/test_testcase.py1
-rw-r--r--xtesting/tests/unit/energy/test_functest_energy.py14
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)