Add unit-tests for toddlers
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
6216256b38
commit
edeafd6159
6 changed files with 582 additions and 0 deletions
16
tests/plugins/test_debug.py
Normal file
16
tests/plugins/test_debug.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import toddlers.plugins.debug
|
||||
|
||||
import fedora_messaging.api
|
||||
|
||||
|
||||
class TestDebugToddler:
|
||||
def test_accepts_topic(self):
|
||||
assert toddlers.plugins.debug.DebugToddler.accepts_topic("foo.bar") == True
|
||||
|
||||
def test_process(self):
|
||||
msg = fedora_messaging.api.Message()
|
||||
msg.id = 123
|
||||
msg.topic = "toddlers.test.topic"
|
||||
assert (
|
||||
toddlers.plugins.debug.DebugToddler.process(config={}, message=msg) == None
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue