def test_invalid_event(self):
    with mock_library(wsa_invalid_event=(lambda _: True)):
        with self.assertRaises(WindowsAPIError):
            WSACreateEvent()
def test_invalid_event(self):
    with mock_library(wsa_invalid_event=(lambda _: True)):
        with self.assertRaises(WindowsAPIError):
            WSACreateEvent()