On 7/23/07, <b class="gmail_sendername">Christian Simms</b> <<a href="mailto:christian.simms@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">christian.simms@gmail.com</a>> wrote:<div>
<span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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
<br>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:<br><br> return self.deferred<br><br>This way, each unit test will not start until the Deferred from loadDevelopers fires.
</blockquote><div><br>That worked! I was so close to this over the weekend too. I'm starting to feel as though I need an MIT degree to understand this stuff. :)<br><br>Brendon<br> </div><br></div>