From 405a0872282f5b29bb9e60ba19b11b17c8047647 Mon Sep 17 00:00:00 2001 From: Benoit HERARD Date: Wed, 27 Sep 2017 14:01:28 +0200 Subject: Add log details on SDK first connection. On first call to energy recording API, if API is unreachable, SDK don't do anything anymore. This change add logs on error for this first connection. Change-Id: I88892c769d6208c6ddf5d714d438ab584826844e Signed-off-by: Benoit HERARD --- functest/tests/unit/energy/test_functest_energy.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'functest/tests') diff --git a/functest/tests/unit/energy/test_functest_energy.py b/functest/tests/unit/energy/test_functest_energy.py index 5e2254ad..738bd3e1 100644 --- a/functest/tests/unit/energy/test_functest_energy.py +++ b/functest/tests/unit/energy/test_functest_energy.py @@ -99,7 +99,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.post', @@ -113,7 +113,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.post', @@ -127,7 +127,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.post', @@ -141,7 +141,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.post', @@ -155,7 +155,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.post', @@ -169,7 +169,7 @@ class EnergyRecorderTest(unittest.TestCase): auth=EnergyRecorder.energy_recorder_api["auth"], data=mock.ANY, headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.delete', @@ -182,7 +182,7 @@ class EnergyRecorderTest(unittest.TestCase): EnergyRecorder.energy_recorder_api["uri"], auth=EnergyRecorder.energy_recorder_api["auth"], headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.delete', @@ -195,7 +195,7 @@ class EnergyRecorderTest(unittest.TestCase): EnergyRecorder.energy_recorder_api["uri"], auth=EnergyRecorder.energy_recorder_api["auth"], headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @mock.patch('functest.energy.energy.requests.delete', @@ -208,7 +208,7 @@ class EnergyRecorderTest(unittest.TestCase): EnergyRecorder.energy_recorder_api["uri"], auth=EnergyRecorder.energy_recorder_api["auth"], headers=self.request_headers, - timeout=EnergyRecorder.CONNECTION_TIMOUT + timeout=EnergyRecorder.CONNECTION_TIMEOUT ) @energy.enable_recording -- cgit 1.2.3-korg