diff options
| author | 2020-06-13 15:51:34 +0200 | |
|---|---|---|
| committer | 2020-06-13 15:51:34 +0200 | |
| commit | 00a44226cb659319b9df5f568b0f67f9a0ed3360 (patch) | |
| tree | 4a7df8cb9a80f73ab600898cdbf8da078f0128f3 | |
| parent | Incidents tests: use our own helper mocks (diff) | |
Incidents tests: improve mock `Signal` name & move def
Let's make it clear that this is our own mock. We also move the
definition to the top of the module.
| -rw-r--r-- | tests/bot/cogs/moderation/test_incidents.py | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/tests/bot/cogs/moderation/test_incidents.py b/tests/bot/cogs/moderation/test_incidents.py index d7cc84734..a349c1cb7 100644 --- a/tests/bot/cogs/moderation/test_incidents.py +++ b/tests/bot/cogs/moderation/test_incidents.py @@ -6,6 +6,11 @@ from bot.cogs.moderation import incidents  from tests.helpers import MockMessage, MockReaction, MockTextChannel, MockUser +class MockSignal(enum.Enum): +    A = "A" +    B = "B" + +  @patch("bot.constants.Channels.incidents", 123)  class TestIsIncident(unittest.TestCase):      """ @@ -95,12 +100,7 @@ class TestHasSignals(unittest.TestCase):              self.assertFalse(incidents.has_signals(message)) -class Signal(enum.Enum): -    A = "A" -    B = "B" - - -@patch("bot.cogs.moderation.incidents.Signal", Signal) +@patch("bot.cogs.moderation.incidents.Signal", MockSignal)  class TestAddSignals(unittest.IsolatedAsyncioTestCase):      """      Assertions for the `add_signals` coroutine. | 
