mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:26:02 -04:00
Add a new version of the R30 phone-home metric, which removes a false impression of retention given by the old R30 metric (#10332)
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
This commit is contained in:
parent
95e47b2e78
commit
4e340412c0
6 changed files with 416 additions and 5 deletions
|
@ -594,7 +594,15 @@ class HomeserverTestCase(TestCase):
|
|||
user_id = channel.json_body["user_id"]
|
||||
return user_id
|
||||
|
||||
def login(self, username, password, device_id=None):
|
||||
def login(
|
||||
self,
|
||||
username,
|
||||
password,
|
||||
device_id=None,
|
||||
custom_headers: Optional[
|
||||
Iterable[Tuple[Union[bytes, str], Union[bytes, str]]]
|
||||
] = None,
|
||||
):
|
||||
"""
|
||||
Log in a user, and get an access token. Requires the Login API be
|
||||
registered.
|
||||
|
@ -605,7 +613,10 @@ class HomeserverTestCase(TestCase):
|
|||
body["device_id"] = device_id
|
||||
|
||||
channel = self.make_request(
|
||||
"POST", "/_matrix/client/r0/login", json.dumps(body).encode("utf8")
|
||||
"POST",
|
||||
"/_matrix/client/r0/login",
|
||||
json.dumps(body).encode("utf8"),
|
||||
custom_headers=custom_headers,
|
||||
)
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue