On 7/23/07, Christian Simms <christian.simms@gmail.com> wrote:
To fix your unit tests to "wait" until your data is loaded by your loadDevelopers method, you need to have your setUp method return the Deferred created by loadDevelopers's. There are a bunch of ways to do this, the simplest is probably to have your factory's __init__ method store the
Deferred created by loadDevelopers into a member variable (say self.deferred), and then add a new line to the end of your setUp method above:
return self.deferred
This way, each unit test will not start until the Deferred from loadDevelopers fires.