Hi All,

Created a sample project like this:

tg-admin quickstart --sqlalchemy
Enter project name: ltest1sa
Enter package name [ltest1sa]:
Do you need Identity (usernames/passwords) in this project? [no] yes

Then, uncommented the code in test_model.py. test_model.py now looks
like this:
------------------
# test_model.py
from turbogears import testutil, database                   # added
database
from ltest1sa.model import User                               # removed
YourDataClass

database.set_db_uri("postgres://username:[EMAIL PROTECTED]/tm")
# set uri

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 = "[EMAIL PROTECTED]",
                   display_name = "Mr Creosote",
                   password = "Wafer-thin Mint")
     assert obj.display_name == "Mr Creosote"
-------------
While running tests, I get some error as below:
-------------
[EMAIL PROTECTED] ltest1sa]# nosetests
..E
======================================================================
ERROR: Object creation should set the name
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a7-py2.4.egg/turbogears/testutil.py",
line 73, in setUp
    sqlobject.SQLObject) and item != sqlobject.SQLObject \
TypeError: issubclass() arg 1 must be a class

----------------------------------------------------------------------
Ran 3 tests in 1.587s

FAILED (errors=1)
----------------------------------------------------------------------

Need help. Thanks.

Sanjay


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to