Let fake server tests override the default client exception handler
This can by done by adding an exception handler with `early=True' in the `_start_client' method of a subclass of `fake_server._FakeServerTest'.
This commit is contained in:
1 parent
252e60a6e2
commit
7693961fb9
2 files changed
+12
-10
No files matched your search
@@ -352,7 +352,7 @@ class HandleExceptionTest(ConnectTest):
|
||||
def handle_login_success(_packet):
|
||||
raise Exception(message)
|
||||
|
||||
@client.exception_handler()
|
||||
@client.exception_handler(early=True)
|
||||
def handle_exception(exc, _exc_info):
|
||||
assert isinstance(exc, Exception) and exc.args == (message,)
|
||||
raise fake_server.FakeServerTestSuccess
|
||||
|
||||
Reference in new issue
Block a user