Created
November 26, 2008 18:46
-
-
Save wilkes/29485 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_refer_physician_no_caller(self): | |
signals.referral_without_caller.disconnect(alerts.referral_without_caller) | |
callback_called = Ref(False) | |
def cb(sender, **kwargs): | |
callback_called(True) | |
signals.referral_without_caller.connect(cb) | |
physician = milkman.deliver(Physician, is_active=True) | |
try: | |
self.vut.get(views.refer_caller_to_physician, [physician.id], {'disposition': ''}) | |
except KeyError: | |
pass | |
else: | |
self.fail("Should have a KeyError") | |
assert callback_called() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment