diff options
author | Stavros Korokithakis <hi@stavros.io> | 2018-12-10 05:02:04 +0200 |
---|---|---|
committer | Stavros Korokithakis <hi@stavros.io> | 2018-12-10 05:02:04 +0200 |
commit | 9f48c1c7e1622261ee1c6de4c79841d696d81a41 (patch) | |
tree | d4e9dfcf638c98474ae374bea74d9c6e30b70c46 | |
parent | dbf88b39969f6be1bc68b030d54eed46e1115538 (diff) | |
download | pysignald-9f48c1c7e1622261ee1c6de4c79841d696d81a41.tar.gz pysignald-9f48c1c7e1622261ee1c6de4c79841d696d81a41.zip |
Add more tests
-rw-r--r-- | tests/test_signald.py | 21 |
1 files changed, 18 insertions, 3 deletions
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 |