changeset 122:40fa8f909776

Fix test.
author Daniele Nicolodi <daniele@grinta.net>
date Tue, 11 Oct 2011 19:16:20 +0200
parents 41137a8a2b4c
children 9cccafa2c753
files src/ltpdarepo/tests/test_users.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/tests/test_users.py	Tue Oct 11 18:28:28 2011 +0200
+++ b/src/ltpdarepo/tests/test_users.py	Tue Oct 11 19:16:20 2011 +0200
@@ -106,10 +106,10 @@
             token = re.search(regexp, response.data).group(1)
 
             # create user
-            response = client.post('/manage/users/+', follow_redirects=True,
+            response = client.post('/manage/users/+', #follow_redirects=True,
                 data=dict(username='u2', email='u2@example.net', csrf=token))
-            self.assertEqual(response.status_code, 200)
-            self.assertIn('User created. Activation token', response.data)
+            self.assertEqual(response.status_code, 302)
+            self.assertEqual(response.location, 'http://localhost/manage/users/')
 
             # check sent email
             from flask import _request_ctx_stack
@@ -132,10 +132,10 @@
             token = re.search(regexp, response.data).group(1)
 
             # create user
-            response = client.post('/manage/users/u1/reset', follow_redirects=True,
+            response = client.post('/manage/users/u1/reset', #follow_redirects=True,
                 data=dict(ok='ok', csrf=token))
-            self.assertEqual(response.status_code, 200)
-            self.assertIn('Password reset token', response.data)
+            self.assertEqual(response.status_code, 302)
+            self.assertEqual(response.location, 'http://localhost/manage/users/')
 
             # check sent email
             from flask import _request_ctx_stack