diff options
author | David Baker <dbkr@users.noreply.github.com> | 2019-05-16 17:27:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 17:27:39 +0100 |
commit | 07cff7b1214060a4505030fc9eb822d974da9610 (patch) | |
tree | add1759e9b58bf32ba51cd408a17c44db7435f4c /tests | |
parent | Make /sync attempt to return device updates for both joined and invited users... (diff) | |
parent | Terms might not be the last stage (diff) | |
download | synapse-07cff7b1214060a4505030fc9eb822d974da9610.tar.xz |
Merge pull request #5174 from matrix-org/dbkr/add_dummy_flow_to_recaptcha_only
Re-order registration stages to do msisdn & email auth last
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rest/client/v2_alpha/test_auth.py | 9 | ||||
-rw-r--r-- | tests/test_terms_auth.py | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/tests/rest/client/v2_alpha/test_auth.py b/tests/rest/client/v2_alpha/test_auth.py index ad7d476401..b9ef46e8fb 100644 --- a/tests/rest/client/v2_alpha/test_auth.py +++ b/tests/rest/client/v2_alpha/test_auth.py @@ -92,7 +92,14 @@ class FallbackAuthTests(unittest.HomeserverTestCase): self.assertEqual(len(self.recaptcha_attempts), 1) self.assertEqual(self.recaptcha_attempts[0][0]["response"], "a") - # Now we have fufilled the recaptcha fallback step, we can then send a + # also complete the dummy auth + request, channel = self.make_request( + "POST", "register", {"auth": {"session": session, "type": "m.login.dummy"}} + ) + self.render(request) + + # Now we should have fufilled a complete auth flow, including + # the recaptcha fallback step, we can then send a # request to the register API with the session in the authdict. request, channel = self.make_request( "POST", "register", {"auth": {"session": session}} diff --git a/tests/test_terms_auth.py b/tests/test_terms_auth.py index f412985d2c..52739fbabc 100644 --- a/tests/test_terms_auth.py +++ b/tests/test_terms_auth.py @@ -59,7 +59,7 @@ class TermsTestCase(unittest.HomeserverTestCase): for flow in channel.json_body["flows"]: self.assertIsInstance(flow["stages"], list) self.assertTrue(len(flow["stages"]) > 0) - self.assertEquals(flow["stages"][-1], "m.login.terms") + self.assertTrue("m.login.terms" in flow["stages"]) expected_params = { "m.login.terms": { |