diff options
author | Anike Arni <anikarni@gmail.com> | 2017-03-13 18:41:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 18:41:59 -0300 |
commit | 99a6a41ffea6de9e4b3df43265282d76c3391fd1 (patch) | |
tree | 2b4d7b3c5ebd267ad252ab05c440a90033e4f962 /service/test/integration/test_multi_user_login.py | |
parent | 8595d3d4f31b761574c08d6f9cdf5bfc00f53a99 (diff) | |
parent | 412d95d64b5d26d4f5e00a85b7b62da23e9bb168 (diff) |
Merge branch 'master' into makefile-tests
Diffstat (limited to 'service/test/integration/test_multi_user_login.py')
-rw-r--r-- | service/test/integration/test_multi_user_login.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/service/test/integration/test_multi_user_login.py b/service/test/integration/test_multi_user_login.py index fe456583..04cceec3 100644 --- a/service/test/integration/test_multi_user_login.py +++ b/service/test/integration/test_multi_user_login.py @@ -13,7 +13,6 @@ # # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. -from mock import patch from twisted.internet import defer @@ -47,8 +46,8 @@ class MultiUserLoginTest(MultiUserSoledadTestBase): self.assertEquals(val, response[key]) @defer.inlineCallbacks - def test_wrong_credentials_cannot_access_resources(self): + def test_wrong_credentials_is_redirected_to_login(self): response, login_request = self.app_test_client.login('username', 'wrong_password') - response_str = yield response - self.assertEqual(401, login_request.responseCode) - self.assertIn('Invalid username or password', login_request.written) + yield response + self.assertEqual(302, login_request.responseCode) + self.assertIn('/login?auth-error', login_request.responseHeaders.getRawHeaders('location')) |