Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1901 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

SqlObject must be installed even if I use SQLAlchemy

Reported by: Gustavo Owned by: anonymous
Priority: normal Milestone: 1.1b1
Component: TurboGears Version: 1.0.5
Severity: normal Keywords:


I use SQLAlchemy, but if SqlObject is not installed I get this exception:

ERROR: Object creation should set the name
Traceback (most recent call last):
  File "/home/gustavo/animador/animador/tests/model.py", line 38, in setUp
    super(TestMember, self).setUp()
  File "/usr/lib/python2.5/site-packages/TurboGears-1.0.5-py2.5.egg/turbogears/testutil.py", line 184, in setUp
    sqlobject.SQLObject) and item != sqlobject.SQLObject \
AttributeError: 'NoneType' object has no attribute 'SQLObject'

Change History

comment:1 Changed 11 years ago by Chris Arndt

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 1.1 beta 1

testutil.DBTest (from which your test class in tests/model.py derives) does not support SQLAlchemy in TG 1.0.

This is fixed in the TG 1.1 branch by r5277.

This will not be fixed in TG 1.0 anymore, since the 1.0 branch is in maintenance mode now, but you can easily copy the DBTestSA class (+ Superclass) from 1.1 to your own test module or just overwrite the setUp / tearDown methods in your test class.

Note: See TracTickets for help on using tickets.