aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-19 09:26:42 -0800
committerGravatar MarkKoz <[email protected]>2020-02-19 09:52:52 -0800
commite5a7af3811f7f2687026254f44194b3a16459ca2 (patch)
treeb9df84fc889fdc12844828d5291752dc3dfb5847 /tests
parentTests: fix unawaited error for MockAPIClient (diff)
Sync: add confirmation timeout and max diff to config
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/sync/test_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py
index 0539f5683..e6a6f9688 100644
--- a/tests/bot/cogs/sync/test_base.py
+++ b/tests/bot/cogs/sync/test_base.py
@@ -361,10 +361,10 @@ class SyncerSyncTests(unittest.TestCase):
self.assertEqual(self.syncer._get_confirmation_result.call_args[0][1], author)
self.assertEqual(self.syncer._get_confirmation_result.call_args[0][2], message)
+ @mock.patch.object(constants.Sync, "max_diff", new=3)
@helpers.async_test
async def test_confirmation_result_small_diff(self):
"""Should always return True and the given message if the diff size is too small."""
- self.syncer.MAX_DIFF = 3
author = helpers.MockMember()
expected_message = helpers.MockMessage()
@@ -381,10 +381,10 @@ class SyncerSyncTests(unittest.TestCase):
self.syncer._send_prompt.assert_not_called()
self.syncer._wait_for_confirmation.assert_not_called()
+ @mock.patch.object(constants.Sync, "max_diff", new=3)
@helpers.async_test
async def test_confirmation_result_large_diff(self):
"""Should return True if confirmed and False if _send_prompt fails or aborted."""
- self.syncer.MAX_DIFF = 3
author = helpers.MockMember()
mock_message = helpers.MockMessage()