Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Diez B. Roggisch <diez.roggisch@ar...> - 2007-10-09 09:25:38
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
It seems that something has changed behind the curtains of the testutils in
TG, which causes the following error:
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
The reason is that in my test, essentially I do this:
o = create_an_sql_object()
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?