toddlers/tests/plugins/test_debug.py

18 lines
436 B
Python
Raw Normal View History

import fedora_messaging.api
from toddlers.plugins.debug import DebugToddler
class TestDebugToddler:
toddler_cls = DebugToddler
def test_accepts_topic(self, toddler):
assert toddler.accepts_topic("foo.bar")
def test_process(self, toddler):
msg = fedora_messaging.api.Message()
msg.id = 123
msg.topic = "toddlers.test.topic"
assert toddler.process(config={}, message=msg) is None