def test_it_enqueues_delete_annotation_celery_task_for_delete( self, add_annotation, delete_annotation, pyramid_request): event = events.AnnotationEvent(pyramid_request, {"id": "test_annotation_id"}, "delete") subscribers.subscribe_annotation_event(event) delete_annotation.delay.assert_called_once_with(event.annotation_id) assert not add_annotation.delay.called
def test_it_enqueues_delete_annotation_celery_task_for_delete( self, add_annotation, delete_annotation, pyramid_request ): event = events.AnnotationEvent( pyramid_request, {"id": "test_annotation_id"}, "delete" ) subscribers.subscribe_annotation_event(event) delete_annotation.delay.assert_called_once_with(event.annotation_id) assert not add_annotation.delay.called
def test_it_enqueues_add_annotation_celery_task(self, action, add_annotation, delete_annotation, pyramid_request): event = events.AnnotationEvent(pyramid_request, {'id': 'test_annotation_id'}, action) subscribers.subscribe_annotation_event(event) add_annotation.delay.assert_called_once_with(event.annotation_id) assert not delete_annotation.delay.called