def test_unsubscribe_sequence(self): self.generate_fixture_comment() notifications_service.subscribe_to_sequence(self.person_dict["id"], self.sequence_dict["id"], self.task_type_dict["id"]) notifications_service.unsubscribe_from_sequence( self.person_dict["id"], self.sequence_dict["id"], self.task_type_dict["id"]) recipients = notifications_service.get_notification_recipients( self.task_dict) self.assertFalse(self.person_dict["id"] in recipients)
def unsubscribe_from_sequence(sequence_id, task_type_id): """ Remove subscription entry for current user and given sequence """ current_user = persons_service.get_current_user() return notifications_service.unsubscribe_from_sequence( current_user["id"], sequence_id, task_type_id)