Commits

Marcin Kuzminski committed 12c9762

fixed test for new version 100% test are ok

Comments (0)

Files changed (4)

pylons_app/tests/__init__.py

         response = self.app.post(url(controller='login', action='index'),
                                  {'username':username,
                                   'password':password})
+        print response
+        
+        if 'invalid user name' in response.body:
+            assert False, 'could not login using %s %s' % (username, password)
+        
         assert response.status == '302 Found', 'Wrong response code from login got %s' % response.status
         assert response.session['hg_app_user'].username == username, 'wrong logged in user got %s expected %s' % (response.session['hg_app_user'].username, username)
         return response.follow()

pylons_app/tests/functional/test_admin_settings.py

         response = self.app.post(url('admin_settings_my_account_update'), params=dict(
                                                             _method='put',
                                                             username='test_admin',
-                                                            new_password='test',
+                                                            new_password='test12',
                                                             password='',
                                                             name='NewName',
                                                             lastname='NewLastname',

pylons_app/tests/functional/test_login.py

     def test_login_admin_ok(self):
         response = self.app.post(url(controller='login', action='index'),
                                  {'username':'test_admin',
-                                  'password':'test'})
+                                  'password':'test12'})
         assert response.status == '302 Found', 'Wrong response code from login got %s' % response.status
         assert response.session['hg_app_user'].username == 'test_admin', 'wrong logged in user'
         response = response.follow()
     def test_login_regular_ok(self):
         response = self.app.post(url(controller='login', action='index'),
                                  {'username':'test_regular',
-                                  'password':'test'})
+                                  'password':'test12'})
         print response
         assert response.status == '302 Found', 'Wrong response code from login got %s' % response.status
         assert response.session['hg_app_user'].username == 'test_regular', 'wrong logged in user'
         test_came_from = '/_admin/users'
         response = self.app.post(url(controller='login', action='index', came_from=test_came_from),
                                  {'username':'test_admin',
-                                  'password':'test'})
+                                  'password':'test12'})
         assert response.status == '302 Found', 'Wrong response code from came from redirection'
         response = response.follow()
         

pylons_app/tests/functional/test_settings.py

         
         
         #test if fork is visible in the list ?
-        response.follow()
+        response = response.follow()
         
         print response
-        assert False