Beispiel #1
0
 def test_remove_preview_file(self):
     self.generate_fixture_preview_file()
     preview_file_id = self.preview_file.id
     files_service.remove_preview_file(preview_file_id)
     self.assertRaises(
         PreviewFileNotFoundException,
         files_service.get_preview_file,
         preview_file_id,
     )
Beispiel #2
0
 def remove_comment_and_related(self, comment_id):
     comment = tasks_service.get_comment(comment_id)
     notifications_service.delete_notifications_for_comment(comment["id"])
     tasks_service.delete_comment(comment["id"])
     if comment["preview_file_id"] is not None:
         files_service.remove_preview_file(comment["preview_file_id"])