From 9f48c1c7e1622261ee1c6de4c79841d696d81a41 Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Mon, 10 Dec 2018 05:02:04 +0200 Subject: Add more tests --- tests/test_signald.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_signald.py b/tests/test_signald.py index 801192b..33be9a4 100644 --- a/tests/test_signald.py +++ b/tests/test_signald.py @@ -1,8 +1,23 @@ -def test_signal(): - from signald import Signal - from signald.types import Message, Attachment +import re + +from signald import Signal +from signald.types import Attachment, Message + +def test_signal(): # Smoke tests. Signal("+1234567890") Message("+1234567890", "+1234567891", "Hello!") Attachment("application/json", "123", 123, "/var/123") + + +def test_bot(): + s = Signal("+1234567890") + + @s.chat_handler("simple message") + def foo(message, match): + pass + + @s.chat_handler(re.compile("compiled regex")) + def bar(message, match): + pass -- cgit v1.2.3-54-g00ecf