From ac77d76af2944c7f87a3e5e37ce654950926dfa9 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 13 Sep 2020 00:27:55 +0200 Subject: Add test for play_card without card ID specified Signed-off-by: Olivier Gayot --- tests/test_swiftstory.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_swiftstory.py b/tests/test_swiftstory.py index 51dc837..d340613 100644 --- a/tests/test_swiftstory.py +++ b/tests/test_swiftstory.py @@ -40,3 +40,10 @@ class TestSwiftStory(unittest.TestCase): error("invalid command"), SwiftStory.message_received_handler(client=None, message='{}') ) + + def test_play_card_not_specified(self): + payload = '{"op": "play_white_card"}' + self.assertEqual( + error("field `card_id' is required"), + SwiftStory.message_received_handler(client=None, message=payload) + ) -- cgit v1.2.3