[Twisted-Python] Deferreds and Trial -- getting my timing right
![](https://secure.gravatar.com/avatar/a676c380494bec013011bf0531e0d707.jpg?s=120&d=mm&r=g)
Oct. 31, 2007
12:13 p.m.
Greetings, I've paused development to bring my unittests up to date, and have hit another snag. I am under the impression that no real work should be done in my factory's init, so I have a bunch of routines that load data from a DB in startFactory() (they all return deferreds from adbapi). I'm not sure when startFactory() runs, but I know it's definitely not running before my tests fire. I'm curious: do I need to move my data loading back into init, save the deferred and return that deferred from setUp to have all my pre-loading complete before my tests run? When does startFactory() actually fire? Thanks, Brendon Colby
6316
Age (days ago)
6317
Last active (days ago)
4 comments
2 participants
participants (2)
-
Brendon Colby
-
Jean-Paul Calderone