diff options
author | Erik Johnston <erik@matrix.org> | 2019-06-11 13:29:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 13:29:42 +0100 |
commit | 9532eb55ecbd4e3a9b0e547257ab9456e7d59c96 (patch) | |
tree | 6bff38796aaad0920db0dcc38a0e8ab497665707 /tests/unittest.py | |
parent | Neilj/improve federation docs (#5419) (diff) | |
parent | Bump bleach version so that tests can run on old deps. (diff) | |
download | synapse-9532eb55ecbd4e3a9b0e547257ab9456e7d59c96.tar.xz |
Merge pull request #5424 from matrix-org/erikj/change_password_reset_links
Change password reset links to /_matrix.
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index 26204470b1..7dbb64af59 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -441,3 +441,15 @@ class HomeserverTestCase(TestCase): access_token = channel.json_body["access_token"] return access_token + + def attempt_wrong_password_login(self, username, password): + """Attempts to login as the user with the given password, asserting + that the attempt *fails*. + """ + body = {"type": "m.login.password", "user": username, "password": password} + + request, channel = self.make_request( + "POST", "/_matrix/client/r0/login", json.dumps(body).encode('utf8') + ) + self.render(request) + self.assertEqual(channel.code, 403, channel.result) |