rpms/python-tg-devtools/EL-5 python-tg-devtools-test_admin.patch, NONE, 1.1

Luke Macken lmacken at fedoraproject.org
Mon Nov 16 22:12:59 UTC 2009


Author: lmacken

Update of /cvs/pkgs/rpms/python-tg-devtools/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27303

Added Files:
	python-tg-devtools-test_admin.patch 
Log Message:
Add the missing patch

python-tg-devtools-test_admin.patch:
 test_pastetemplate.py |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- NEW FILE python-tg-devtools-test_admin.patch ---
--- devtools/tests/test_pastetemplate.py.orig	2009-06-03 10:41:04.000000000 -0400
+++ devtools/tests/test_pastetemplate.py	2009-06-03 10:41:13.000000000 -0400
@@ -1,5 +1,5 @@
 from devtools.pastetemplate import TurboGearsTemplate
-import os, shutil
+import os, shutil, urllib
 import pkg_resources
 from paste.deploy import loadapp
 from webtest import TestApp
@@ -66,10 +66,8 @@
         assert '<div id="loginform">' in resp
 
     def test_admin(self):
-        resp = self.app.get('/admin/')
-        print resp
-        assert 'This is a fully-configurable administrative tool to help you administer your website.' in resp
-        assert '<li><a href="group/">Groups</a></li><li><a href="user/">Users</a></li><li><a href="permission/">Permissions</a></li>' in resp
+        resp = self.app.get('/admin/', status=302)
+        assert 'The current user must belong to the group \\"managers\\"' in urllib.unquote(resp.cookies_set['webflash'])
 
 #now we run the quickstarted project nosetests
 #FIXME, we need a better implementation




More information about the scm-commits mailing list