accounts2/fas/fas/tests __init__.py, NONE, 1.1 test_controllers.py, NONE, 1.1 test_model.py, NONE, 1.1
Michael Patrick McGrath (mmcgrath)
fedora-extras-commits at redhat.com
Mon Mar 26 15:11:26 UTC 2007
- Previous message (by thread): accounts2/fas/fas/static/images favicon.ico, NONE, 1.1 header-icon_account.png, NONE, 1.1 header_inner.png, NONE, 1.1 hr.png, NONE, 1.1 icon_tool-item.png, NONE, 1.1 icon_warning.png, NONE, 1.1 info.png, NONE, 1.1 ok.png, NONE, 1.1 status_approved.png, NONE, 1.1 status_incomplete.png, NONE, 1.1 status_rejected.png, NONE, 1.1 tg_under_the_hood.png, NONE, 1.1 under_the_hood_blue.png, NONE, 1.1
- Next message (by thread): accounts2/fas/fas/templates __init__.py, NONE, 1.1 __init__.pyc, NONE, 1.1 autoComplete.kid, NONE, 1.1 edit.kid, NONE, 1.1 edit.pyc, NONE, 1.1 editAccount.kid, NONE, 1.1 editAccount.kid~, NONE, 1.1 editAccount.pyc, NONE, 1.1 editGroup.kid, NONE, 1.1 editGroup.kid~, NONE, 1.1 editGroup.pyc, NONE, 1.1 error.kid, NONE, 1.1 error.pyc, NONE, 1.1 groupList.kid, NONE, 1.1 groupList.kid~, NONE, 1.1 groupList.pyc, NONE, 1.1 list.kid~, NONE, 1.1 list.pyc, NONE, 1.1 login.kid, NONE, 1.1 login.pyc, NONE, 1.1 master.kid, NONE, 1.1 master.pyc, NONE, 1.1 userList.kid, NONE, 1.1 userList.pyc, NONE, 1.1 welcome.kid, NONE, 1.1 welcome.kid~, NONE, 1.1 welcome.pyc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mmcgrath
Update of /cvs/fedora/accounts2/fas/fas/tests
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26831/fas/fas/tests
Added Files:
__init__.py test_controllers.py test_model.py
Log Message:
added tg fas2 code
--- NEW FILE __init__.py ---
--- NEW FILE test_controllers.py ---
import turbogears
from nose import with_setup
from turbogears import testutil
from fas.controllers import Root
import cherrypy
def teardown_func():
"""Tests for apps using identity need to stop CP/TG after each test to
stop the VisitManager thread. See http://trac.turbogears.org/turbogears/ticket/1217
for details.
"""
turbogears.startup.stopTurboGears()
cherrypy.root = Root()
def test_method():
"the index method should return a string called now"
import types
result = testutil.call(cherrypy.root.index)
assert type(result["now"]) == types.StringType
test_method = with_setup(teardown=teardown_func)(test_method)
def test_indextitle():
"The indexpage should have the right title"
testutil.createRequest("/")
assert "<TITLE>Welcome to TurboGears</TITLE>" in cherrypy.response.body[0]
test_indextitle = with_setup(teardown=teardown_func)(test_indextitle)
def test_logintitle():
"login page should have the right title"
testutil.createRequest("/login")
assert "<TITLE>Login</TITLE>" in cherrypy.response.body[0]
test_logintitle = with_setup(teardown=teardown_func)(test_logintitle)
--- NEW FILE test_model.py ---
# If your project uses a database, you can set up database tests
# similar to what you see below. Be sure to set the db_uri to
# an appropriate uri for your testing database. sqlite is a good
# choice for testing, because you can use an in-memory database
# which is very fast.
from turbogears import testutil, database
# from fas.model import YourDataClass, User
# database.set_db_uri("sqlite:///:memory:")
# class TestUser(testutil.DBTest):
# def get_model(self):
# return User
# def test_creation(self):
# "Object creation should set the name"
# obj = User(user_name = "creosote",
# email_address = "spam at python.not",
# display_name = "Mr Creosote",
# password = "Wafer-thin Mint")
# assert obj.display_name == "Mr Creosote"
- Previous message (by thread): accounts2/fas/fas/static/images favicon.ico, NONE, 1.1 header-icon_account.png, NONE, 1.1 header_inner.png, NONE, 1.1 hr.png, NONE, 1.1 icon_tool-item.png, NONE, 1.1 icon_warning.png, NONE, 1.1 info.png, NONE, 1.1 ok.png, NONE, 1.1 status_approved.png, NONE, 1.1 status_incomplete.png, NONE, 1.1 status_rejected.png, NONE, 1.1 tg_under_the_hood.png, NONE, 1.1 under_the_hood_blue.png, NONE, 1.1
- Next message (by thread): accounts2/fas/fas/templates __init__.py, NONE, 1.1 __init__.pyc, NONE, 1.1 autoComplete.kid, NONE, 1.1 edit.kid, NONE, 1.1 edit.pyc, NONE, 1.1 editAccount.kid, NONE, 1.1 editAccount.kid~, NONE, 1.1 editAccount.pyc, NONE, 1.1 editGroup.kid, NONE, 1.1 editGroup.kid~, NONE, 1.1 editGroup.pyc, NONE, 1.1 error.kid, NONE, 1.1 error.pyc, NONE, 1.1 groupList.kid, NONE, 1.1 groupList.kid~, NONE, 1.1 groupList.pyc, NONE, 1.1 list.kid~, NONE, 1.1 list.pyc, NONE, 1.1 login.kid, NONE, 1.1 login.pyc, NONE, 1.1 master.kid, NONE, 1.1 master.pyc, NONE, 1.1 userList.kid, NONE, 1.1 userList.pyc, NONE, 1.1 welcome.kid, NONE, 1.1 welcome.kid~, NONE, 1.1 welcome.pyc, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list