On 7/23/07, <b class="gmail_sendername">Christian Simms</b> &lt;<a href="mailto:christian.simms@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">christian.simms@gmail.com</a>&gt; 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 &quot;wait&quot; until your data is loaded by your loadDevelopers method, you need to have your setUp method return the Deferred created by loadDevelopers&#39;s. There are a bunch of ways to do this, the simplest is probably to have your factory&#39;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>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&#39;m starting to feel as though I need an MIT degree to understand this stuff. :)<br><br>Brendon<br>&nbsp;</div><br></div>