def test_unsubscribe_async(self):
        hook = self.environment._hookmanager.hooks[0]
        hook.context.unsubscribe('event1', hook.async_handler)
        self.environment.context.trigger('event1')
        time.sleep(0.1)
        self.assertFalse(hook.async_called.is_set())
Async handler is unsubscribed.
dataset/ETHPy150Open F-Secure/see/see/test/environment_test.py/EnvironmentTest.test_unsubscribe_async