'Test that when an action is created, it results in a realtime notification being sent.'

def test_from_action_to_realtime_notification(self, requests):

    u = UserFactory()
    q = QuestionFactory()
    url = 'http://example.com/simple_push/asdf'
    ct = ContentType.objects.get_for_model(q)
    RealtimeRegistration.objects.create(creator=u, endpoint=url, content_type=ct, object_id=q.id)
    action.send(UserFactory(), verb='looked    at    funny', action_object=q)
    a = Action.objects.order_by('-id')[0]
    requests.put.assert_called_once_with(url, 'version={}'.format(a.id))
