Cleanup tests

This commit is contained in:
Adam Hopkins 2023-08-21 22:54:04 +03:00
parent 9e7ca10c52
commit 44bf7ba79a
No known key found for this signature in database
GPG Key ID: 9F85EE6C807303FB

View File

@ -517,7 +517,7 @@ def test_stack_trace_on_not_found(app, static_file_directory, caplog):
counter = Counter([(r[0], r[1]) for r in caplog.record_tuples]) counter = Counter([(r[0], r[1]) for r in caplog.record_tuples])
assert response.status == 404 assert response.status == 404
assert counter[("sanic.root", logging.INFO)] == 9 assert counter[("sanic.root", logging.INFO)] == 10
assert counter[("sanic.root", logging.ERROR)] == 0 assert counter[("sanic.root", logging.ERROR)] == 0
assert counter[("sanic.error", logging.ERROR)] == 0 assert counter[("sanic.error", logging.ERROR)] == 0
assert counter[("sanic.server", logging.INFO)] == 2 assert counter[("sanic.server", logging.INFO)] == 2
@ -536,7 +536,7 @@ def test_no_stack_trace_on_not_found(app, static_file_directory, caplog):
counter = Counter([(r[0], r[1]) for r in caplog.record_tuples]) counter = Counter([(r[0], r[1]) for r in caplog.record_tuples])
assert response.status == 404 assert response.status == 404
assert counter[("sanic.root", logging.INFO)] == 9 assert counter[("sanic.root", logging.INFO)] == 10
assert counter[("sanic.root", logging.ERROR)] == 0 assert counter[("sanic.root", logging.ERROR)] == 0
assert counter[("sanic.error", logging.ERROR)] == 0 assert counter[("sanic.error", logging.ERROR)] == 0
assert counter[("sanic.server", logging.INFO)] == 2 assert counter[("sanic.server", logging.INFO)] == 2