mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-14 06:17:17 +00:00
Add forgotten test case
This commit is contained in:
parent
613d906b44
commit
89b720c439
@ -31,15 +31,6 @@ def fsm_update_msg():
|
||||
}
|
||||
|
||||
|
||||
def test_ignores_other_keys():
|
||||
messages = []
|
||||
eh = FSMAwareEventHandler(DummyConnector())
|
||||
eh.handle_event = lambda msg, _: messages.append(msg)
|
||||
|
||||
simulate_event(eh, {"key": "not.fsm.update"})
|
||||
assert not messages
|
||||
|
||||
|
||||
def test_ignores_unauthenticated(fsm_update_msg):
|
||||
messages = []
|
||||
eh = FSMAwareEventHandler(DummyConnector())
|
||||
@ -49,6 +40,17 @@ def test_ignores_unauthenticated(fsm_update_msg):
|
||||
assert not messages
|
||||
|
||||
|
||||
def test_ignores_other_keys(key):
|
||||
messages = []
|
||||
eh = FSMAwareEventHandler(DummyConnector())
|
||||
eh.handle_event = lambda msg, _: messages.append(msg)
|
||||
|
||||
test_msg = {"key": "not.fsm.update"}
|
||||
sign_message(key, test_msg)
|
||||
simulate_event(eh, test_msg)
|
||||
assert not messages
|
||||
|
||||
|
||||
def test_accepts_authenticated(key, fsm_update_msg):
|
||||
messages = []
|
||||
eh = FSMAwareEventHandler(DummyConnector())
|
||||
|
Loading…
Reference in New Issue
Block a user