summaryrefslogtreecommitdiff
path: root/service/test/integration
diff options
context:
space:
mode:
authorAnike Arni <anikarni@gmail.com>2017-02-21 18:39:06 -0300
committerGitHub <noreply@github.com>2017-02-21 18:39:06 -0300
commit92c6a9dbc39318df48b4b3d5fae1a3888f201343 (patch)
tree548fb92a6ae19d34945c19b2c704cc8c2c97382a /service/test/integration
parentd5d7c8607138c8f39b55cdaa6ef3231c98d6af8a (diff)
parentdb1db55b806953ff93950b724fc96c8db388bbcf (diff)
Merge pull request #986 from pixelated/login-errors
Translate and make login responsive
Diffstat (limited to 'service/test/integration')
-rw-r--r--service/test/integration/test_multi_user_login.py9
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'))