I created a project with

tg-admin quickstart --sqlalchemy -t tgbig

Chosing 'y' to identity.

When I tried to uncomment the db tests in test/ they fail. Adding


config.update({"sqlalchemy.dburi" : "sqlite:///:memory:"})

before the import of model fixes the first problem.

The second problem is that using the default test I get the following  
error

======================================================================
ERROR: test_creation (honeymine.tests.test_model.TestUser)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ 
lib/python2.4/site-packages/TurboGears-0.9a9-py2.4.egg/turbogears/ 
testutil.py", line 84, in setUp
     sqlobject.SQLObject) and item != sqlobject.SQLObject \
TypeError: issubclass() arg 1 must be a class

----------------------------------------------------------------------
Ran 3 tests in 3.277s

FAILED (errors=1)

which would imply that it is still looking for SQLObject somewhere.

test_model.py:

from turbogears import testutil, config
config.update({"sqlalchemy.dburi" : "sqlite:///:memory:"})
from myproject.model import User

class TestUser(testutil.DBTest):
      def get_model(self):
          return User

      def test_creation(self):
          obj = User(user_name = "creosote", email_address =  
"[EMAIL PROTECTED]", display_name = "My Creosote", password = "Wafer- 
thin Mint")
          assert obj.password == "Password"


Anyone know what is happening here? At the least, I think the  
template for tests/ needs to be altered when --sqlalchemy is used.

Cheers,

Arthur

-- 
Arthur Clune      [EMAIL PROTECTED]
"Anyone who says they understand TCP/IP, doesn't" - Van Jacobsen




--~--~---------~--~----~------------~-------~--~----~
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