diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-23 23:33:36 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-24 10:39:52 +0100 |
commit | 35667b31ddf1ce47a56ccbf4db9896dbc165ad0a (patch) | |
tree | 758fa5203849f284bd8379d8928b22dfbbbc699e /test.py | |
parent | 88e486a61fd563b3d30d34e1962269eae5a931bf (diff) | |
download | Trader-35667b31ddf1ce47a56ccbf4db9896dbc165ad0a.tar.gz Trader-35667b31ddf1ce47a56ccbf4db9896dbc165ad0a.tar.zst Trader-35667b31ddf1ce47a56ccbf4db9896dbc165ad0a.zip |
Cleanup market from_config
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3682,7 +3682,7 @@ class MainTest(WebMockTestCase): | |||
3682 | args_mock.after = "after" | 3682 | args_mock.after = "after" |
3683 | self.assertEqual("", stdout_mock.getvalue()) | 3683 | self.assertEqual("", stdout_mock.getvalue()) |
3684 | 3684 | ||
3685 | main.process(3, "config", 1, "report_path", args_mock, "pg_config") | 3685 | main.process("config", 3, 1, args_mock, "report_path", "pg_config") |
3686 | 3686 | ||
3687 | market_mock.from_config.assert_has_calls([ | 3687 | market_mock.from_config.assert_has_calls([ |
3688 | mock.call("config", args_mock, pg_config="pg_config", market_id=3, user_id=1, report_path="report_path"), | 3688 | mock.call("config", args_mock, pg_config="pg_config", market_id=3, user_id=1, report_path="report_path"), |
@@ -3719,8 +3719,8 @@ class MainTest(WebMockTestCase): | |||
3719 | 3719 | ||
3720 | self.assertEqual(2, process.call_count) | 3720 | self.assertEqual(2, process.call_count) |
3721 | process.assert_has_calls([ | 3721 | process.assert_has_calls([ |
3722 | mock.call(3, "config1", 1, "report_path", args_mock, "pg_config"), | 3722 | mock.call("config1", 3, 1, args_mock, "report_path", "pg_config"), |
3723 | mock.call(1, "config2", 2, "report_path", args_mock, "pg_config"), | 3723 | mock.call("config2", 1, 2, args_mock, "report_path", "pg_config"), |
3724 | ]) | 3724 | ]) |
3725 | with self.subTest(parallel=True): | 3725 | with self.subTest(parallel=True): |
3726 | with mock.patch("main.parse_args") as parse_args,\ | 3726 | with mock.patch("main.parse_args") as parse_args,\ |
@@ -3749,9 +3749,9 @@ class MainTest(WebMockTestCase): | |||
3749 | self.assertEqual(2, process.call_count) | 3749 | self.assertEqual(2, process.call_count) |
3750 | process.assert_has_calls([ | 3750 | process.assert_has_calls([ |
3751 | mock.call.__bool__(), | 3751 | mock.call.__bool__(), |
3752 | mock.call(3, "config1", 1, "report_path", args_mock, "pg_config"), | 3752 | mock.call("config1", 3, 1, args_mock, "report_path", "pg_config"), |
3753 | mock.call.__bool__(), | 3753 | mock.call.__bool__(), |
3754 | mock.call(1, "config2", 2, "report_path", args_mock, "pg_config"), | 3754 | mock.call("config2", 1, 2, args_mock, "report_path", "pg_config"), |
3755 | ]) | 3755 | ]) |
3756 | 3756 | ||
3757 | @mock.patch.object(main.sys, "exit") | 3757 | @mock.patch.object(main.sys, "exit") |