Commits

Gael Pasgrimaud committed 732908a

fix test_repoze

Comments (0)

Files changed (3)

shabti/template.py

 
 
 class ShabtiAuthRepozeWhatTemplate(Template):
-    required_templates = ['shabti_auth']
+    required_templates = ['shabti_auth_repozewho']
     _template_dir = 'templates/auth_repozewhat'
     summary = 'Shabti auth using repoze.what'
     template_renderer = staticmethod(paste_script_template_renderer)
 
 
 class ShabtiAuthRepozePylonsTemplate(Template):
-    required_templates = ['shabti_auth']
+    required_templates = ['shabti_auth_repozewhat']
     _template_dir = 'templates/auth_repozepylons'
     summary = 'auth + auth using repoze.what and repoze.who'
     template_renderer = staticmethod(paste_script_template_renderer)

shabti/templates/auth_repozewhat/+package+/tests/functional/test_login.py_tmpl

-# auth_repozewhat/tests/functional/test_appserver
-from pylons import url
-from {{package}}.tests import *
-
-class TestLoginController(TestController):
-    def test_index(self):
-        """TestLoginController (auth_repozewhat): check login page is presented"""
-        response = self.app.get(url(controller='login'))
-        print(response)
-        assert 'action="/login_handler?__logins=0&came_from=/"' in response
-    
-
-# --- Overridden by auth_repozewhat template

shabti/templates/auth_repozewho/+package+/tests/functional/test_login.py_tmpl

 class TestLoginController(TestController):
     def test_index(self):
         """TestLoginController (auth_repozewho): check login page is presented"""
-        response = self.app.get(url(controller='login'))
+        response = self.app.get(url(controller='login', action='index'))
         assert 'action="/login_handler?__logins=0&came_from=/"' in response
     
 # --- Added by Shabt auth_repozewho template