Skip to content

Instantly share code, notes, and snippets.

@wilkes
Created November 26, 2008 18:46
Show Gist options
  • Save wilkes/29485 to your computer and use it in GitHub Desktop.
Save wilkes/29485 to your computer and use it in GitHub Desktop.
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