Bläddra i källkod

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.
tags/dinsic_2019-03-21
Richard van der Hoff 5 år sedan
committed by GitHub
förälder
incheckning
a6f2d3053d
Ingen känd nyckel hittad för denna signaturen i databasen GPG-nyckel ID: 4AEE18F83AFDEB23
2 ändrade filer med 2 tillägg och 8 borttagningar
  1. +1
    -0
      changelog.d/4905.misc
  2. +1
    -8
      tests/server.py

+ 1
- 0
changelog.d/4905.misc Visa fil

@@ -0,0 +1 @@
Log requests which are simulated by the unit tests.

+ 1
- 8
tests/server.py Visa fil

@@ -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(


Laddar…
Avbryt
Spara