Three more notes:
1. I might be wrong about when a call to self.push_urls_onto_reactor() is needed.
2. Feel free to make liberal use of the FakeGetPage() object at the top of
mysite/customs/tests.py. If you use @mock.patch() to patch out the real getPage
with that one, then that will let you download arbitrary URLs (so long as you
save a copy of them somewhere in the repo) during a run of a test.
3. I can totally see how crazy this code is now. Luckily there are some ideas
for cleaning up our use of Twisted, which would de-insane it.
I don't think this is going to be done before 0.11.11, but we've made a lot of
really good progress on it! Marking as "later," but I'm hoping we can land it
for 0.11.12. |