Hmm. Maybe I'd be happier if VumiApi just had a class variable called "_on_create" that was set to "None" and was overridden by tests. That seems to be a fairly common sort of idiom in Twisted.