blob: 33be9a4444dbfd6c7baf236729768795410a7898 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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
|