[Twisted-Python] testing my application
Marcin.Kasperski at softax.com.pl
Thu Oct 20 10:18:15 EDT 2005
> Currently I have the following problem: my test script hangs.
> Via simplification I got to the following text (requires some
> postgres database):
> def setUp(self):
> self.dbpool = adbapi.ConnectionPool('psycopg', DSN)
> # (populating some test data)
> deferredResult( self.dbpool.runInteraction(self._insertTestData) )
Hmm, replying to myself, it seems that when I changed to
self.dbpool = adbapi.ConnectionPool('psycopg', DSN)
my test seems to work. Could anyone confirm that setUp (and tearDown) are also allowed to return deferreds?
I have also another problem. In fact I need to run a few deferred-returning functions within setUp. How should I join them? I can create DeferredList but will it then be checked for failures?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python