UT: Remove event queue's unsubscribing tests

This commit is contained in:
Shreya Malviya 2022-08-09 11:39:43 +05:30
parent f3ef99db64
commit ae2ba0e068
1 changed files with 0 additions and 48 deletions

View File

@ -53,51 +53,3 @@ def test_subscribe_tags():
assert event_queue_file.pub.sendMessage.call_count == 3
assert subscriber.call_count == 1
def test_unsubscribe_all():
subscriber = MagicMock()
EventQueue.subscribe_all(subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 3
assert subscriber.call_count == 3
EventQueue.unsubscribe_all(subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 6
assert subscriber.call_count == 3
def test_unsubscribe_types():
subscriber = MagicMock()
EventQueue.subscribe_all(subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 3
assert subscriber.call_count == 3
EventQueue.unsubscribe_types([EventType], subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 6
assert subscriber.call_count == 5
def test_unsubscribe_tags():
subscriber = MagicMock()
EventQueue.subscribe_all(subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 3
assert subscriber.call_count == 3
EventQueue.unsubscribe_tags([EVENT_TAG_1, EVENT_TAG_2], subscriber)
EventQueue.publish(EventType)
assert event_queue_file.pub.sendMessage.call_count == 6
assert subscriber.call_count == 4