# HG changeset patch # User Daniele Nicolodi # Date 1318353380 -7200 # Node ID 40fa8f9097769206c49601b65dcdeca245c27190 # Parent 41137a8a2b4c3b051fb526a07bf789d83d6b1d39 Fix test. diff -r 41137a8a2b4c -r 40fa8f909776 src/ltpdarepo/tests/test_users.py --- 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