X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Ftest_store.py;h=e281adb3a62d2013d0acd090595263ff843f0461;hb=9fe90554ff1c8c7aea9e1e1e210419a845579edd;hp=408c0e88cac7a667b088233af6db26a37205f010;hpb=1d72880c097ea8259ce9cc63cfe55e6cc7516bd2;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/tests/test_store.py b/tests/test_store.py index 408c0e8..e281adb 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -830,6 +830,7 @@ class ReportStoreTest(WebMockTestCase): response = mock.Mock() response.status_code = 200 response.text = "Hey" + response.elapsed.total_seconds.return_value = 120 report_store.log_http_request("method", "url", "body", "headers", response) @@ -840,6 +841,7 @@ class ReportStoreTest(WebMockTestCase): 'body': 'body', 'headers': 'headers', 'status': 200, + 'duration': 120, 'response': 'Hey', 'response_same_as': None, }) @@ -1245,7 +1247,7 @@ class PortfolioTest(WebMockTestCase): store.Portfolio.callback.wait() - report.print_log.assert_called_once_with("Fetching cryptoportfolio") + report.print_log.assert_called_once_with("[Worker] Fetching cryptoportfolio") get.assert_called_once_with(refetch=True) sleep.assert_called_once_with(3) self.assertFalse(store.Portfolio.worker_notify.is_set())