From a6f2d3053d4f6faf4ca9c3523688ba5aa6be69ec Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Wed, 20 Mar 2019 18:00:02 +0000 Subject: [PATCH] Log requests which are simulated by the unit tests. (#4905) Rather than stubbing out the access_log, make it actually log the requests, which makes it a lot more obvious what is going on during tests. --- changelog.d/4905.misc | 1 + tests/server.py | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 changelog.d/4905.misc diff --git a/changelog.d/4905.misc b/changelog.d/4905.misc new file mode 100644 index 0000000000..0f00d5a3d5 --- /dev/null +++ b/changelog.d/4905.misc @@ -0,0 +1 @@ +Log requests which are simulated by the unit tests. diff --git a/tests/server.py b/tests/server.py index 37069afdda..ea26dea623 100644 --- a/tests/server.py +++ b/tests/server.py @@ -119,14 +119,7 @@ class FakeSite: server_version_string = b"1" site_tag = "test" - - @property - def access_logger(self): - class FakeLogger: - def info(self, *args, **kwargs): - pass - - return FakeLogger() + access_logger = logging.getLogger("synapse.access.http.fake") def make_request(