MCPcopy Create free account

hub / github.com/aliviahossain/Disease-prediction / functions

Functions597 in github.com/aliviahossain/Disease-prediction

Functiontest_logout_post_succeeds
(client)
backend/tests/test_auth_routes.py:4
Functiontest_low_probabilities
()
backend/tests/test_validation.py:102
Methodtest_low_probabilities
(self)
backend/tests/test_calculator.py:44
Methodtest_low_threshold_variant_accepts_lower_score
(self)
backend/tests/test_uncertainty_handler.py:137
Methodtest_medium_score_with_clear_margin_is_sufficient
(self)
backend/tests/test_uncertainty_handler.py:133
Functiontest_mid_range_probabilities
()
backend/tests/test_validation.py:88
Methodtest_mid_range_probabilities
(self)
backend/tests/test_calculator.py:40
Functiontest_ml_prediction_returns_feature_impacts_and_summary
()
backend/tests/test_ml_explainability.py:4
Methodtest_narrow_margin_is_insufficient
(self)
backend/tests/test_uncertainty_handler.py:67
Methodtest_no_top2_skips_margin_check
(self)
backend/tests/test_uncertainty_handler.py:81
Functiontest_normalize_key_handles_display_labels
()
backend/tests/test_preprocessing.py:14
Methodtest_pagination
(self, app, client, make_user)
backend/tests/test_patient_history.py:267
Methodtest_patient_dashboard_requires_login
Test that patient dashboard redirects unauthenticated users to login.
backend/tests/test_doctor_dashboard.py:326
Methodtest_prediction_endpoint_error_handling
Test that prediction endpoint returns JSON on error
backend/tests/test_fetch_endpoints.py:164
Methodtest_prediction_endpoint_with_valid_symptoms
Test prediction endpoint returns proper response
backend/tests/test_fetch_endpoints.py:136
Methodtest_prediction_risk_level_saved
Test that risk level is correctly saved based on probability.
backend/tests/test_doctor_dashboard.py:226
Methodtest_prediction_saved_to_database
Test that predictions are saved to the database.
backend/tests/test_doctor_dashboard.py:206
Methodtest_prediction_symptoms_stored_as_json
Test that symptoms are stored as JSON string.
backend/tests/test_doctor_dashboard.py:249
Functiontest_preset_disease_calculation
Test preset disease endpoint with valid data
backend/tests/test_integration.py:28
Functiontest_preset_invalid_disease
Test preset disease endpoint with invalid disease
backend/tests/test_integration.py:43
Functiontest_preset_missing_disease_field
(client)
backend/tests/test_integration.py:111
Functiontest_prior_out_of_bounds
(prior)
backend/tests/test_validation.py:17
Functiontest_production_missing_gemini_key
Test that ValueError is raised in production when GEMINI_API_KEY is missing
backend/tests/test_startup_validation.py:49
Functiontest_production_missing_model_files
Test that FileNotFoundError is raised in production when a model file is missing
backend/tests/test_startup_validation.py:66
Functiontest_production_missing_secret_key
Test that ValueError is raised in production when SECRET_KEY is missing
backend/tests/test_startup_validation.py:17
Functiontest_production_weak_secret_key
Test that ValueError is raised in production when SECRET_KEY is too short/weak
backend/tests/test_startup_validation.py:34
Functiontest_profile_accepts_valid_contact_demographics_and_metrics
(client)
backend/tests/test_profile_validation.py:101
Functiontest_profile_handles_readonly_database_without_500
(client, monkeypatch)
backend/tests/test_profile_validation.py:162
Functiontest_profile_rejects_incomplete_dropdown_dob
(client)
backend/tests/test_profile_validation.py:239
Functiontest_profile_rejects_invalid_contact_and_future_dob
(client)
backend/tests/test_profile_validation.py:42
Functiontest_profile_rejects_negative_physical_metrics
(client)
backend/tests/test_profile_validation.py:147
Functiontest_profile_rejects_numbers_in_medical_safety_fields
(client)
backend/tests/test_profile_validation.py:186
Functiontest_profile_rejects_phone_without_country_code_plus
(client)
backend/tests/test_profile_validation.py:133
Functiontest_profile_rejects_unrealistic_old_dob
(client)
backend/tests/test_profile_validation.py:90
Functiontest_profile_renders_dob_dropdown_options
(client)
backend/tests/test_profile_validation.py:71
Functiontest_profile_renders_medical_safety_digit_blockers
(client)
backend/tests/test_profile_validation.py:81
Functiontest_profile_update_preserves_fields_not_in_post
(client)
backend/tests/test_profile_validation.py:201
Functiontest_profile_update_without_csrf_returns_400
POST /profile/update with no CSRF token must be rejected.
backend/tests/test_csrf.py:88
Functiontest_rare_combinations
Test rare symptom combinations.
backend/tests/test_synthetic.py:29
Functiontest_rate_limiter_load_in_memory
Test that RateLimiter initializes InMemoryBackend by default or when configured.
backend/tests/test_rate_limiter.py:210
Functiontest_rate_limiter_load_redis_fallback
Test that RateLimiter falls back to InMemoryBackend if Redis connection/initialization fails.
backend/tests/test_rate_limiter.py:234
Functiontest_rate_limiter_load_sqlite
Test that RateLimiter initializes SQLiteBackend when configured.
backend/tests/test_rate_limiter.py:218
Methodtest_reason_is_non_empty_for_low_confidence
(self)
backend/tests/test_uncertainty_handler.py:98
Methodtest_reason_is_none_when_sufficient
(self)
backend/tests/test_uncertainty_handler.py:117
Methodtest_reason_mentions_disease_names_for_margin_fail
(self)
backend/tests/test_uncertainty_handler.py:107
Methodtest_reason_mentions_threshold_percentage
(self)
backend/tests/test_uncertainty_handler.py:103
Functiontest_redis_backend_lua_mock
Test RedisBackend using mock Redis client executing Lua script.
backend/tests/test_rate_limiter.py:173
Methodtest_risk_classifier
(self, prob, expected)
backend/tests/test_patient_history.py:229
Functiontest_sanitize_via_preset_strips_script_tag
(client)
tests/test_disease_routes.py:131
Functiontest_sanitize_via_preset_truncates_long_name
(client)
tests/test_disease_routes.py:138
Methodtest_save_for_anonymous_user_is_noop
(self, app)
backend/tests/test_patient_history.py:190
Methodtest_save_never_raises_on_bad_input
A history failure must never break the prediction itself.
backend/tests/test_patient_history.py:200
Methodtest_save_persists_row
(self, app)
backend/tests/test_patient_history.py:175
Functiontest_secret_key_auto_generated_in_dev
Test that app auto-generates SECRET_KEY in development when not provided
backend/tests/test_secret_key.py:51
Functiontest_secret_key_from_env
Test that app loads SECRET_KEY from environment variable
backend/tests/test_secret_key.py:15
Functiontest_secret_key_length_validation
Test that app requires a reasonably long SECRET_KEY
backend/tests/test_secret_key.py:92
Functiontest_secret_key_missing_in_production
Test that app raises error when SECRET_KEY is missing in production
backend/tests/test_secret_key.py:32
Functiontest_secret_key_not_hardcoded
Test that SECRET_KEY is not hardcoded in the application
backend/tests/test_secret_key.py:111
Functiontest_secret_key_with_flask_debug_flag
Test that app recognizes FLASK_DEBUG=1 as development mode
backend/tests/test_secret_key.py:73
Functiontest_sensitivity_out_of_bounds
(sens)
backend/tests/test_validation.py:24
Methodtest_server_error_returns_json
Test that 500 errors return JSON
backend/tests/test_fetch_endpoints.py:208
Functiontest_signup_with_valid_csrf_is_not_rejected_for_csrf
POST /signup with a valid CSRF token must not return 400 (CSRF passes).
backend/tests/test_csrf.py:122
Functiontest_signup_without_csrf_returns_400
POST /signup with no CSRF token must be rejected.
backend/tests/test_csrf.py:79
Functiontest_specificity_out_of_bounds
(spec)
backend/tests/test_validation.py:31
Functiontest_sqlite_backend_basic
Test SQLiteBackend basic functionality.
backend/tests/test_rate_limiter.py:112
Functiontest_sqlite_backend_cleanup
Test SQLiteBackend cleanup of stale entries.
backend/tests/test_rate_limiter.py:146
Methodtest_strict_threshold_accepts_high_confidence
(self)
backend/tests/test_uncertainty_handler.py:147
Methodtest_strict_threshold_rejects_borderline
(self)
backend/tests/test_uncertainty_handler.py:142
Methodtest_successful_response_has_200
Test that successful responses have 200 status
backend/tests/test_fetch_endpoints.py:226
Methodtest_sufficient_margin_is_ok
(self)
backend/tests/test_uncertainty_handler.py:77
Methodtest_symptoms_endpoint_error_handling
Test that symptoms endpoint handles errors gracefully
backend/tests/test_fetch_endpoints.py:117
Methodtest_symptoms_endpoint_returns_json
Test that symptoms endpoint returns valid JSON
backend/tests/test_fetch_endpoints.py:88
Methodtest_symptoms_response_format
Test that symptoms response has correct format for frontend
backend/tests/test_fetch_endpoints.py:99
Methodtest_to_dict
Test that to_dict returns correct structure.
backend/tests/test_doctor_dashboard.py:297
Methodtest_to_dict_handles_bad_json
(self, app)
backend/tests/test_patient_history.py:158
Methodtest_to_dict_round_trip
(self, app)
backend/tests/test_patient_history.py:136
Functiontest_tts_exactly_max_length
(client)
tests/test_disease_routes.py:44
Functiontest_tts_exceeds_max_length
(client)
tests/test_disease_routes.py:36
Functiontest_tts_invalid_language
(client)
tests/test_disease_routes.py:20
Functiontest_tts_no_text
(client)
tests/test_disease_routes.py:52
Functiontest_tts_valid_language
(client)
tests/test_disease_routes.py:28
Functiontest_type_errors
(args)
backend/tests/test_validation.py:66
Functiontest_typical_valid_cases
()
backend/tests/test_validation.py:73
Methodtest_unauthorized_returns_json_not_html
Test that 401 errors return JSON, not HTML
backend/tests/test_fetch_endpoints.py:183
Functiontest_user
Create a test user and return their ID
backend/tests/test_fetch_endpoints.py:29
Functiontest_user
Create a real user for authenticated dashboard tests.
backend/tests/test_doctor_dashboard.py:54
Functiontest_valid_bounds_negative
()
backend/tests/test_validation.py:11
Functiontest_valid_bounds_positive
()
backend/tests/test_validation.py:6
Functiontest_validation_passes_when_valid
Test that validation passes completely without warning/error when everything is present
backend/tests/test_startup_validation.py:105
Methodtest_verify_order_invariance_on_symptom_sequences
(self)
backend/tests/test_calculator.py:153
Functiontext_to_speech
()
backend/routes/disease_routes.py:489
Functionupdate_profile
()
backend/routes/auth_routes.py:309
FunctionusePreset
()
backend/static/script.js:303
Methodvalidate_disease_name
Validate disease name. Args: disease: Disease name Returns: Tuple of (is_valid: bool, error_message
backend/middleware/security.py:486
Functionvalidate_json_request
Decorator to validate that request contains valid JSON. Example: @app.route('/api/predict', methods=['POST']) @validate_json
backend/middleware/error_handler.py:385
Functionvalidate_request_data
Decorator for validating request data. Args: required_fields: List of required field names optional_fields: List of optional
backend/middleware/security.py:569
Methodvalidate_symptoms
Validate symptom list. Args: symptoms: List of symptoms Returns: Tuple of (is_valid: bool, error_me
backend/middleware/security.py:452
← previous501–597 of 597, ranked by callers