From e45c64a5ace2637a9ff290a42cde89e2403ae53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 10 May 2018 16:33:25 +0200 Subject: Fetch only enabled market --- tests/test_main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_main.py b/tests/test_main.py index 1864c06..298e29e 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -325,7 +325,7 @@ class MainTest(WebMockTestCase): with self.subTest(user=None): rows = list(main.fetch_markets(None)) - cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs") + cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE status='enabled'") self.assertEqual(["row_1", "row_2"], rows) @@ -333,7 +333,7 @@ class MainTest(WebMockTestCase): with self.subTest(user=1): rows = list(main.fetch_markets(1)) - cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE user_id = %s", 1) + cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE status='enabled' AND user_id = %s", 1) self.assertEqual(["row_1", "row_2"], rows) -- cgit v1.2.3