Hi,
I'm writing a TurboGears application that uses SO (0.9.1). I'm in the process
of migrating to a more up-to-date TG-version and work around unit test
troubles.
It seems that something has changed behind the curtains of the testutils in
TG, which causes the following error:
"""
File
"/usr/lib/python2.4/site-packages/SQLObject-0.9.1-py2.4.egg/sqlobject/dbconnection.py",
line 832, in assertActive
assert not self._obsolete, "This transaction has already gone through
ROLLBACK; begin another transaction"
AssertionError: This transaction has already gone through ROLLBACK; begin
another transaction
"""
The reason is that in my test, essentially I do this:
o = create_an_sql_object()
self.browser.goto('/some/url')
o.state = 'new_state'
The last line fails. So what happens is that the browser.goto makes the old
transaction the object was created in commit & close.
Now I could circumvene this doing
o = ClassOfO.get(o.id)
to make o "live" again in the current transaction. But I wonder - is there
some on-the-object call I could use for that?
Regards,
Diez
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss