Coverage report: 89%

Files Functions Classes

coverage.py v7.9.2, created at 2026-07-24 16:42 +0000

File function statements missing excluded coverage
app.py lifespan 3 0 0 100%
app.py create_app 27 2 0 93%
app.py create_app.noj_exception_handler 1 0 0 100%
app.py create_app.validation_exception_handler 1 0 0 100%
app.py _seed_db 7 0 0 100%
app.py (no function) 15 0 0 100%
config.py Settings._lenient_testing 3 0 0 100%
config.py Settings._require_smtp_noreply 3 0 0 100%
config.py (no function) 30 0 0 100%
dispatch/job.py _redis 3 0 0 100%
dispatch/job.py _now 1 0 0 100%
dispatch/job.py _decode 3 1 0 67%
dispatch/job.py enqueue_job 10 0 0 100%
dispatch/job.py claim_next_job 9 0 0 100%
dispatch/job.py renew_lease 3 0 0 100%
dispatch/job.py _orphan_scan 10 0 0 100%
dispatch/job.py _payload 6 1 0 83%
dispatch/job.py (no function) 17 0 0 100%
dispatch/params.py (no function) 8 0 0 100%
dispatch/redis_keys.py runner_meta 1 0 0 100%
dispatch/redis_keys.py runner_token_hash 1 0 0 100%
dispatch/redis_keys.py runner_alive 1 0 0 100%
dispatch/redis_keys.py job 1 0 0 100%
dispatch/redis_keys.py submission_current_job 1 0 0 100%
dispatch/redis_keys.py submission_job_lock 1 1 0 0%
dispatch/redis_keys.py (no function) 10 0 0 100%
dispatch/runner.py _redis 3 0 0 100%
dispatch/runner.py _now 1 0 0 100%
dispatch/runner.py _token_hash 1 0 0 100%
dispatch/runner.py _utf8 4 0 0 100%
dispatch/runner.py verify_registration_token 8 0 0 100%
dispatch/runner.py register 14 0 0 100%
dispatch/runner.py verify_token 13 0 0 100%
dispatch/runner.py list_runners 14 0 0 100%
dispatch/runner.py _gc 21 1 0 95%
dispatch/runner.py (no function) 27 0 0 100%
dispatch/scripts.py load 1 0 0 100%
dispatch/scripts.py (no function) 11 0 0 100%
migrations/2023_11_06_000001_drop_contests.py main 6 6 0 0%
migrations/2023_11_06_000001_drop_contests.py (no function) 4 4 0 0%
model/announcement.py _format_ann 1 0 0 100%
model/announcement.py get_sys_ann 4 0 0 100%
model/announcement.py get_course_announcements 8 3 0 62%
model/announcement.py get_ann_by_id 8 0 0 100%
model/announcement.py create_announcement 8 0 0 100%
model/announcement.py update_announcement 11 0 0 100%
model/announcement.py delete_announcement 8 0 0 100%
model/announcement.py (no function) 25 0 0 100%
model/auth.py login_required 11 0 0 100%
model/auth.py identity_verify 2 0 0 100%
model/auth.py identity_verify.dependency 3 0 0 100%
model/auth.py get_verify_link 1 0 0 100%
model/auth.py logout 2 0 0 100%
model/auth.py login 8 0 0 100%
model/auth.py signup 13 0 0 100%
model/auth.py change_password 7 0 0 100%
model/auth.py check_username 5 0 0 100%
model/auth.py check_email 5 0 0 100%
model/auth.py check_invalid 1 0 0 100%
model/auth.py resend_email 9 0 0 100%
model/auth.py active_redirect 6 0 0 100%
model/auth.py activate_user 16 0 0 100%
model/auth.py password_recovery 10 0 0 100%
model/auth.py add_user 9 0 0 100%
model/auth.py batch_signup 19 3 0 84%
model/auth.py get_me 9 0 0 100%
model/auth.py (no function) 49 0 0 100%
model/copycat.py is_valid_url 2 0 0 100%
model/copycat.py get_report_task 40 0 0 100%
model/copycat.py get_report_by_url 5 0 0 100%
model/copycat.py get_report 24 0 0 100%
model/copycat.py detect 25 0 0 100%
model/copycat.py (no function) 22 0 0 100%
model/course.py get_courses 2 0 0 100%
model/course.py get_courses_summary 8 0 0 100%
model/course.py create_course 14 2 0 86%
model/course.py update_course_meta 15 4 0 73%
model/course.py delete_course 10 1 0 90%
model/course.py get_course 6 2 0 67%
model/course.py update_course 25 0 0 100%
model/course.py get_grade 10 3 0 70%
model/course.py add_grade 16 2 0 88%
model/course.py update_grade 21 3 0 86%
model/course.py delete_grade 18 4 0 78%
model/course.py get_course_scoreboard 22 0 0 100%
model/course.py (no function) 36 0 0 100%
model/health.py health 7 0 0 100%
model/health.py (no function) 9 0 0 100%
model/homework.py create_homework 11 4 0 64%
model/homework.py get_homework 8 2 0 75%
model/homework.py update_homework 7 4 0 43%
model/homework.py delete_homework 8 1 0 88%
model/homework.py get_homework_list 12 0 0 100%
model/homework.py get_ip_filters 7 0 0 100%
model/homework.py patch_ip_filters 25 0 0 100%
model/homework.py (no function) 23 0 0 100%
model/post.py get_post 7 0 0 100%
model/post.py get_single_post 7 0 0 100%
model/post.py _resolve_post_target 30 0 0 100%
model/post.py add_post 11 0 0 100%
model/post.py edit_post 9 1 0 89%
model/post.py delete_post 9 1 0 89%
model/post.py (no function) 22 0 0 100%
model/problem.py permission_error_response 1 0 0 100%
model/problem.py online_error_response 1 0 0 100%
model/problem.py view_problem_list 22 0 0 100%
model/problem.py get_problem_detailed 7 1 0 86%
model/problem.py create_problem 9 0 0 100%
model/problem.py delete_problem 6 1 0 83%
model/problem.py manage_problem 38 4 0 89%
model/problem.py initiate_test_case_upload 6 6 0 0%
model/problem.py complete_test_case_upload 11 11 0 0%
model/problem.py get_test_case 5 1 0 80%
model/problem.py get_testdata 3 0 0 100%
model/problem.py get_checksum 9 0 0 100%
model/problem.py get_meta 7 0 0 100%
model/problem.py high_score 1 0 0 100%
model/problem.py clone_problem 11 3 0 73%
model/problem.py publish_problem 10 3 0 70%
model/problem.py problem_stats 19 1 0 95%
model/problem.py view_problem 11 0 0 100%
model/problem.py problem_migrate_test_case 4 4 0 0%
model/problem.py (no function) 59 0 0 100%
model/profile.py view_profile 6 0 0 100%
model/profile.py edit_profile 10 0 0 100%
model/profile.py edit_config 8 0 0 100%
model/profile.py (no function) 15 0 0 100%
model/ranking.py get_ranking 2 0 0 100%
model/ranking.py (no function) 8 0 0 100%
model/schemas/announcement.py (no function) 14 0 0 100%
model/schemas/auth.py (no function) 33 0 0 100%
model/schemas/base.py (no function) 4 0 0 100%
model/schemas/copycat.py (no function) 9 0 0 100%
model/schemas/course.py (no function) 24 0 0 100%
model/schemas/homework.py (no function) 21 0 0 100%
model/schemas/post.py (no function) 7 0 0 100%
model/schemas/problem.py (no function) 35 0 0 100%
model/schemas/profile.py (no function) 11 0 0 100%
model/schemas/submission.py (no function) 24 0 0 100%
model/schemas/user.py (no function) 15 0 0 100%
model/submission.py get_config 5 0 0 100%
model/submission.py update_config 24 15 0 38%
model/submission.py create_submission 43 16 0 63%
model/submission.py get_submission_list 43 5 0 88%
model/submission.py get_submission_list.parse_int 6 2 0 67%
model/submission.py get_submission_list.parse_str 3 1 0 67%
model/submission.py get_submission_list.parse_timestamp 6 4 0 33%
model/submission.py get_submission 18 5 0 72%
model/submission.py get_submission_output 9 2 0 78%
model/submission.py get_submission_pdf 13 13 0 0%
model/submission.py on_submission_complete 7 7 0 0%
model/submission.py update_submission 27 9 0 67%
model/submission.py grade_submission 7 2 0 71%
model/submission.py comment_submission 10 10 0 0%
model/submission.py rejudge 15 9 0 40%
model/submission.py migrate_code 4 4 0 0%
model/submission.py migrate_output 4 4 0 0%
model/submission.py (no function) 46 0 0 100%
model/test.py test 1 0 0 100%
model/test.py role 1 0 0 100%
model/test.py log 6 0 0 100%
model/test.py check_header 2 0 0 100%
model/test.py (no function) 15 0 0 100%
model/user.py _user_options_handler 2 0 0 100%
model/user.py get_user_list 23 0 0 100%
model/user.py get_user_summary 3 0 0 100%
model/user.py add_user 9 0 0 100%
model/user.py update_user 9 0 0 100%
model/user.py (no function) 25 0 0 100%
model/utils/request.py get_doc 5 0 0 100%
model/utils/request.py get_doc.dependency 10 2 0 80%
model/utils/request.py get_http_client 1 0 0 100%
model/utils/request.py get_ip 7 2 0 71%
model/utils/request.py (no function) 9 0 0 100%
model/utils/response.py NOJException.__init__ 3 0 0 100%
model/utils/response.py _apply_cookies 6 0 0 100%
model/utils/response.py HTTPResponse 2 0 0 100%
model/utils/response.py HTTPRedirect 2 0 0 100%
model/utils/response.py HTTPError 2 0 0 100%
model/utils/response.py (no function) 10 0 0 100%
model/utils/smtp.py send 12 0 0 100%
model/utils/smtp.py send_noreply 2 0 0 100%
model/utils/smtp.py (no function) 9 0 0 100%
mongo/announcement.py Announcement.__init__ 1 0 0 100%
mongo/announcement.py Announcement.ann_list 9 0 0 100%
mongo/announcement.py Announcement.new_ann 5 0 0 100%
mongo/announcement.py (no function) 14 0 0 100%
mongo/base.py MongoBase.__init_subclass__ 2 0 0 100%
mongo/base.py MongoBase.__new__ 10 0 0 100%
mongo/base.py MongoBase.__getattr__ 1 0 0 100%
mongo/base.py MongoBase.__setattr__ 3 0 0 100%
mongo/base.py MongoBase.__eq__ 1 0 0 100%
mongo/base.py MongoBase.__bool__ 4 0 0 100%
mongo/base.py MongoBase.__str__ 1 0 0 100%
mongo/base.py MongoBase.__repr__ 1 0 0 100%
mongo/base.py MongoBase.reload 3 0 0 100%
mongo/base.py MongoBase.logger 1 0 0 100%
mongo/base.py (no function) 17 0 0 100%
mongo/course.py Course.__new__ 9 0 0 100%
mongo/course.py Course.update_student_namelist 16 0 0 100%
mongo/course.py Course.add_user 4 0 0 100%
mongo/course.py Course.remove_user 2 0 0 100%
mongo/course.py Course.get_all 1 0 0 100%
mongo/course.py Course.get_user_courses 3 0 0 100%
mongo/course.py Course.get_course_summary 1 0 0 100%
mongo/course.py Course.edit_course 18 1 0 94%
mongo/course.py Course.delete_course 7 0 0 100%
mongo/course.py Course.get_scoreboard 19 0 0 100%
mongo/course.py Course.add_course 12 0 0 100%
mongo/course.py Course.get_public 3 0 0 100%
mongo/course.py Course.own_permission 3 0 0 100%
mongo/course.py Course.permission 1 0 0 100%
mongo/course.py (no function) 33 0 0 100%
mongo/engine.py ZipField.__init__ 2 0 0 100%
mongo/engine.py ZipField.validate 12 5 0 58%
mongo/engine.py IntEnumField.__init__ 2 0 0 100%
mongo/engine.py IntEnumField.validate 3 0 0 100%
mongo/engine.py Duration.__contains__ 3 0 0 100%
mongo/engine.py User.info 1 0 0 100%
mongo/engine.py (no function) 192 1 0 99%
mongo/homework.py check_penalty 20 0 0 100%
mongo/homework.py Homework.is_valid_ip 4 0 0 100%
mongo/homework.py Homework.add 30 0 0 100%
mongo/homework.py Homework.update 45 0 0 100%
mongo/homework.py Homework.delete_problems 9 0 0 100%
mongo/homework.py Homework.get_homeworks 3 0 0 100%
mongo/homework.py Homework.get_by_id 5 0 0 100%
mongo/homework.py Homework.get_by_name 5 0 0 100%
mongo/homework.py Homework.default_problem_status 1 0 0 100%
mongo/homework.py Homework.add_student 6 0 0 100%
mongo/homework.py Homework.remove_student 5 0 0 100%
mongo/homework.py Homework.do_penalty 9 0 0 100%
mongo/homework.py (no function) 35 0 0 100%
mongo/ip_filter.py OctetMatcher.__init__ 14 0 0 100%
mongo/ip_filter.py OctetMatcher.__repr__ 1 0 0 100%
mongo/ip_filter.py OctetMatcher.match 3 0 0 100%
mongo/ip_filter.py IPFilter.__init__ 4 0 0 100%
mongo/ip_filter.py IPFilter.__repr__ 1 0 0 100%
mongo/ip_filter.py IPFilter.is_valid_ip 8 0 0 100%
mongo/ip_filter.py IPFilter.match 3 0 0 100%
mongo/ip_filter.py (no function) 12 0 0 100%
mongo/post.py Post.found_thread 6 0 0 100%
mongo/post.py Post.found_post 7 0 0 100%
mongo/post.py Post.add_post 10 0 0 100%
mongo/post.py Post.add_reply 12 0 0 100%
mongo/post.py Post.edit_post 19 0 0 100%
mongo/post.py Post.delete_post 3 0 0 100%
mongo/post.py (no function) 19 0 0 100%
mongo/problem/exception.py (no function) 2 0 0 100%
mongo/problem/problem.py Problem.detailed_info 24 0 0 100%
mongo/problem/problem.py Problem.allowed 5 0 0 100%
mongo/problem/problem.py Problem.submit_count 4 0 0 100%
mongo/problem/problem.py Problem.running_homeworks 3 0 0 100%
mongo/problem/problem.py Problem.is_valid_ip 1 0 0 100%
mongo/problem/problem.py Problem.get_submission_status 3 0 0 100%
mongo/problem/problem.py Problem.get_ac_user_count 2 0 0 100%
mongo/problem/problem.py Problem.get_tried_user_count 2 0 0 100%
mongo/problem/problem.py Problem.high_score_key 1 0 0 100%
mongo/problem/problem.py Problem.get_high_score 10 0 0 100%
mongo/problem/problem.py Problem.own_permission 18 0 0 100%
mongo/problem/problem.py Problem.permission 1 0 0 100%
mongo/problem/problem.py Problem.get_problem_list 12 0 0 100%
mongo/problem/problem.py Problem.add 13 0 0 100%
mongo/problem/problem.py Problem.edit_problem 18 0 0 100%
mongo/problem/problem.py Problem.update_test_case 3 0 0 100%
mongo/problem/problem.py Problem._save_test_case_zip 5 0 0 100%
mongo/problem/problem.py Problem._generate_test_case_obj_path 1 0 0 100%
mongo/problem/problem.py Problem._validate_test_case 14 0 0 100%
mongo/problem/problem.py Problem.copy_problem 2 0 0 100%
mongo/problem/problem.py Problem.copy_to 6 0 0 100%
mongo/problem/problem.py Problem.release_problem 5 0 0 100%
mongo/problem/problem.py Problem.is_test_case_ready 1 1 0 0%
mongo/problem/problem.py Problem.get_test_case 9 9 0 0%
mongo/problem/problem.py Problem.migrate_gridfs_to_minio 11 11 0 0%
mongo/problem/problem.py Problem._remove_test_case_in_mongodb 3 3 0 0%
mongo/problem/problem.py Problem.check_test_case_consistency 16 16 0 0%
mongo/problem/problem.py Problem.generate_urls_for_uploading_test_case 7 7 0 0%
mongo/problem/problem.py Problem.generate_urls_for_uploading_test_case.get 1 1 0 0%
mongo/problem/problem.py Problem.complete_test_case_upload 8 8 0 0%
mongo/problem/problem.py (no function) 63 0 0 100%
mongo/problem/test_case.py TestCaseRule.__init__ 1 0 0 100%
mongo/problem/test_case.py TestCaseRule.validate 0 0 1 100%
mongo/problem/test_case.py IncludeDirectory.__init__ 3 0 0 100%
mongo/problem/test_case.py IncludeDirectory.validate 10 0 0 100%
mongo/problem/test_case.py SimpleIO.__init__ 2 0 0 100%
mongo/problem/test_case.py SimpleIO.validate 14 0 0 100%
mongo/problem/test_case.py SimpleIO.expected_test_case_filenames 6 0 0 100%
mongo/problem/test_case.py ContextIO.validate 16 0 0 100%
mongo/problem/test_case.py ContextIO.validate_test_case_dir 11 0 0 100%
mongo/problem/test_case.py ContextIO.expected_test_case_dirs 5 0 0 100%
mongo/problem/test_case.py (no function) 20 0 1 100%
mongo/sandbox.py find_by_token 5 0 0 100%
mongo/sandbox.py (no function) 3 0 0 100%
mongo/submission.py gen_key 1 1 0 0%
mongo/submission.py gen_token 1 1 0 0%
mongo/submission.py TestCaseNotFound.__init__ 1 1 0 0%
mongo/submission.py TestCaseNotFound.__str__ 1 1 0 0%
mongo/submission.py SubmissionConfig.__init__ 1 0 0 100%
mongo/submission.py Submission.__init__ 1 0 0 100%
mongo/submission.py Submission.__str__ 1 0 0 100%
mongo/submission.py Submission.id 1 0 0 100%
mongo/submission.py Submission.problem_id 1 0 0 100%
mongo/submission.py Submission.username 1 0 0 100%
mongo/submission.py Submission.status2code 1 0 0 100%
mongo/submission.py Submission.handwritten 1 0 0 100%
mongo/submission.py Submission.tmp_dir 5 0 0 100%
mongo/submission.py Submission.main_code_ext 2 0 0 100%
mongo/submission.py Submission.main_code_path 10 2 0 80%
mongo/submission.py Submission.config 5 0 0 100%
mongo/submission.py Submission.get_single_output 13 0 0 100%
mongo/submission.py Submission._get_output_raw 9 0 0 100%
mongo/submission.py Submission.delete_output 5 0 0 100%
mongo/submission.py Submission.delete 6 6 0 0%
mongo/submission.py Submission.delete.default_del_func 1 1 0 0%
mongo/submission.py Submission.sandbox_resp_handler 10 10 0 0%
mongo/submission.py Submission.sandbox_resp_handler.on_500 1 1 0 0%
mongo/submission.py Submission.sandbox_resp_handler.on_400 1 1 0 0%
mongo/submission.py Submission.sandbox_resp_handler.on_403 1 1 0 0%
mongo/submission.py Submission.target_sandbox 15 1 0 93%
mongo/submission.py Submission.get_comment 3 3 0 0%
mongo/submission.py Submission._check_code 23 0 0 100%
mongo/submission.py Submission.rejudge 5 1 0 80%
mongo/submission.py Submission._generate_code_minio_path 1 0 0 100%
mongo/submission.py Submission._put_code 6 0 0 100%
mongo/submission.py Submission.submit 19 9 0 53%
mongo/submission.py Submission.send 17 17 0 0%
mongo/submission.py Submission.process_result 31 1 0 97%
mongo/submission.py Submission._generate_output_minio_path 1 0 0 100%
mongo/submission.py Submission.finish_judging 24 5 0 79%
mongo/submission.py Submission.add_comment 9 9 0 0%
mongo/submission.py Submission.count 1 1 0 0%
mongo/submission.py Submission.filter 46 3 0 93%
mongo/submission.py Submission.add 11 2 0 82%
mongo/submission.py Submission.assign_token 4 4 0 0%
mongo/submission.py Submission.verify_token 10 10 0 0%
mongo/submission.py Submission.to_dict 3 0 0 100%
mongo/submission.py Submission._to_dict 7 0 0 100%
mongo/submission.py Submission.get_result 5 2 0 60%
mongo/submission.py Submission.get_detailed_result 8 8 0 0%
mongo/submission.py Submission._get_code_raw 11 1 0 91%
mongo/submission.py Submission._get_code_zip 3 0 0 100%
mongo/submission.py Submission.get_code 13 5 0 62%
mongo/submission.py Submission.get_main_code 2 0 0 100%
mongo/submission.py Submission.has_code 1 0 0 100%
mongo/submission.py Submission.own_permission 16 2 0 88%
mongo/submission.py Submission.permission 1 0 0 100%
mongo/submission.py Submission.migrate_code_to_minio 12 12 0 0%
mongo/submission.py Submission._remove_code_in_mongodb 3 3 0 0%
mongo/submission.py Submission._check_code_consistency 17 17 0 0%
mongo/submission.py Submission.migrate_output_to_minio 3 3 0 0%
mongo/submission.py Submission._migrate_case_output_to_minio 16 16 0 0%
mongo/submission.py Submission._check_case_output_consistency 17 17 0 0%
mongo/submission.py (no function) 114 0 0 100%
mongo/user.py User.signup 6 0 0 100%
mongo/user.py User.batch_signup 32 0 0 100%
mongo/user.py User.force_update 11 0 0 100%
mongo/user.py User.login 10 0 0 100%
mongo/user.py User.get_by_username 2 0 0 100%
mongo/user.py User.get_by_email 2 0 0 100%
mongo/user.py User.displayedName 1 0 0 100%
mongo/user.py User.bio 1 0 0 100%
mongo/user.py User.cookie 2 0 0 100%
mongo/user.py User.secret 2 0 0 100%
mongo/user.py User.jwt 6 0 0 100%
mongo/user.py User.properties 6 0 0 100%
mongo/user.py User.change_password 3 0 0 100%
mongo/user.py User.activate 4 0 0 100%
mongo/user.py User.add_submission 4 0 0 100%
mongo/user.py jwt_decode 5 0 0 100%
mongo/user.py (no function) 42 0 1 100%
mongo/utils.py is_testing 1 0 0 100%
mongo/utils.py hash_id 3 0 0 100%
mongo/utils.py perm 1 0 0 100%
mongo/utils.py Cache.exists 0 0 1 100%
mongo/utils.py Cache.get 0 0 1 100%
mongo/utils.py Cache.set 0 0 1 100%
mongo/utils.py Cache.delete 0 0 1 100%
mongo/utils.py RedisCache.__new__ 5 0 0 100%
mongo/utils.py RedisCache.__init__ 1 0 0 100%
mongo/utils.py RedisCache.client 6 0 0 100%
mongo/utils.py RedisCache.exists 1 0 0 100%
mongo/utils.py RedisCache.get 1 0 0 100%
mongo/utils.py RedisCache.delete 1 0 0 100%
mongo/utils.py RedisCache.set 1 0 0 100%
mongo/utils.py doc_required 6 0 0 100%
mongo/utils.py doc_required.deco 2 0 0 100%
mongo/utils.py doc_required.deco.wrapper 19 0 0 100%
mongo/utils.py drop_none 1 0 0 100%
mongo/utils.py MinioClient.__init__ 2 0 0 100%
mongo/utils.py (no function) 37 0 2 100%
recover.py (no function) 0 0 0 100%
Total   3922 444 9 89%

No items found using the specified filter.