mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-26 07:07:58 +00:00
tests: added basic messaging test
This commit is contained in:
15
tests/messaging_test.py
Normal file
15
tests/messaging_test.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
import sys
|
||||
import pytest
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
sys.path.insert(0, os.path.realpath(os.path.join(current_dir, os.pardir)))
|
||||
|
||||
from lib.messaging import CallbackManager
|
||||
|
||||
def test_callback_registration():
|
||||
def f(arg):
|
||||
return arg
|
||||
c = CallbackManager()
|
||||
c.action_callback("123")(f)
|
||||
t = "test"
|
||||
assert t == c.action_callbacks["123"](t)
|
||||
Reference in New Issue
Block a user