diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-10 16:33:25 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-10 16:33:25 +0200 |
commit | e45c64a5ace2637a9ff290a42cde89e2403ae53d (patch) | |
tree | 0810fcbac31803d66c5f553dd174b4a3fc00bec9 /tests | |
parent | 5321200c05b3b693581ec4238c74eb02e0b715d7 (diff) | |
download | Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.gz Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.zst Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.zip |
Fetch only enabled market
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_main.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): | |||
325 | with self.subTest(user=None): | 325 | with self.subTest(user=None): |
326 | rows = list(main.fetch_markets(None)) | 326 | rows = list(main.fetch_markets(None)) |
327 | 327 | ||
328 | cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs") | 328 | cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE status='enabled'") |
329 | 329 | ||
330 | self.assertEqual(["row_1", "row_2"], rows) | 330 | self.assertEqual(["row_1", "row_2"], rows) |
331 | 331 | ||
@@ -333,7 +333,7 @@ class MainTest(WebMockTestCase): | |||
333 | with self.subTest(user=1): | 333 | with self.subTest(user=1): |
334 | rows = list(main.fetch_markets(1)) | 334 | rows = list(main.fetch_markets(1)) |
335 | 335 | ||
336 | cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE user_id = %s", 1) | 336 | cursor_mock.execute.assert_called_once_with("SELECT id,config,user_id FROM market_configs WHERE status='enabled' AND user_id = %s", 1) |
337 | 337 | ||
338 | self.assertEqual(["row_1", "row_2"], rows) | 338 | self.assertEqual(["row_1", "row_2"], rows) |
339 | 339 | ||