UT: Simplify logic in test_pypubsub_event_queue.test_subscribe_types()

This commit is contained in:
Shreya Malviya 2022-08-10 15:45:39 +05:30
parent e905f6eddf
commit 6ecb2f4d49
1 changed files with 2 additions and 3 deletions

View File

@ -78,13 +78,12 @@ def test_subscribe_all():
]
@pytest.mark.usefixtures("subscriber_1", "subscriber_2", "subscriber_1_calls", "subscriber_2_calls")
def test_subscribe_types(subscriber_1, subscriber_2, subscriber_1_calls, subscriber_2_calls):
@pytest.mark.usefixtures("subscriber_1", "subscriber_1_calls")
def test_subscribe_types(subscriber_1, subscriber_1_calls):
pypubsub_event_queue.subscribe_type(EventType, subscriber_1)
pypubsub_event_queue.publish(EventType)
assert subscriber_1_calls == [EventType.__name__]
assert subscriber_2_calls == []
@pytest.mark.usefixtures("subscriber_1", "subscriber_2", "subscriber_1_calls", "subscriber_2_calls")