MCPcopy Create free account

hub / github.com/Shankar-105/Social-Media-Api / functions

Functions373 in github.com/Shankar-105/Social-Media-Api

Functiontest_login_missing_password_returns_422
(client, create_test_user)
pytests/test_auth.py:63
Functiontest_login_returns_refresh_token
Login should now return both accessToken AND refreshToken.
pytests/test_refresh_token.py:19
Functiontest_login_success
(client, create_test_user)
pytests/test_auth.py:6
Functiontest_login_unverified_email_blocked
(client, db_session_factory)
pytests/test_auth.py:24
Functiontest_login_wrong_password
(client, create_test_user)
pytests/test_auth.py:15
Functiontest_logout_invalidates_cached_access_token
A cached access token must still fail after logout/blacklist.
pytests/test_refresh_token.py:145
Functiontest_logout_revokes_refresh_tokens
After logout, the refresh token should no longer work.
pytests/test_refresh_token.py:121
Functiontest_mark_read_is_idempotent_when_empty
PATCH /v1/users/me/notifications/read should succeed even with 0 notifications.
pytests/test_notfications.py:17
Functiontest_media_info_response
Verify MediaInfo schema for profile pictures
pytests/test_edge_cases.py:87
Functiontest_media_urls_properly_constructed
Verify media URLs have full paths
pytests/test_schema_validation.py:39
Methodtest_message_reaction_publishes_to_redis
Test that msg_reaction.react publishes to Redis.
pytests/test_cross_process_chat_delivery.py:127
Functiontest_my_profile
(client, get_token)
pytests/test_me.py:1
Functiontest_notification_list_response_requires_boolean_has_more
()
pytests/test_edge_cases.py:208
Functiontest_notifications_requires_auth
(client)
pytests/test_notfications.py:25
Functiontest_old_refresh_token_rejected_after_rotation
After rotation, the old refresh token is revoked and must be rejected.
pytests/test_refresh_token.py:54
Functiontest_pagination_has_more_calculation
Verify has_more is calculated correctly
pytests/test_edge_cases.py:69
Functiontest_pagination_metadata_structure
Verify pagination includes proper metadata
pytests/test_schema_validation.py:52
Functiontest_post_create_request_rejects_empty_content
()
pytests/test_edge_cases.py:198
Functiontest_post_detail_response_complete
Verify PostDetailResponse has all required fields
pytests/test_edge_cases.py:16
Functiontest_post_response_is_proper_json_not_orm
Verify posts return JSON dict, not ORM objects
pytests/test_schema_validation.py:5
Functiontest_read_receipt_is_idempotent_under_concurrency
(db_session_factory, monkeypatch)
pytests/test_concurrency_hardening.py:41
Methodtest_read_receipt_publishes_to_redis
Test that read_receipt.mark_as_read publishes to Redis.
pytests/test_cross_process_chat_delivery.py:178
Methodtest_receiver_id_routing_strategy
Test the receiver_id routing strategy for cross-process delivery.
pytests/test_cross_process_chat_delivery.py:322
Functiontest_reconciliation_repairs_counter_drift
(db_session_factory)
pytests/test_concurrency_hardening.py:218
Methodtest_redis_channel_name_consistent
Test that all message types publish to the same channel.
pytests/test_cross_process_chat_delivery.py:317
Functiontest_refresh_chain_works
Multiple consecutive rotations should work — each new token is valid.
pytests/test_refresh_token.py:81
Functiontest_refresh_returns_new_pair
POST /v1/auth/refresh-token with a valid refresh token returns fresh access + refresh tokens.
pytests/test_refresh_token.py:34
Functiontest_refresh_tokens_are_hashed_at_rest
(client, create_test_user, db_session_factory)
pytests/test_refresh_token.py:96
Functiontest_refresh_with_bogus_token
A completely made-up token should return 401.
pytests/test_refresh_token.py:74
Functiontest_revoke_and_purge_controls
(monkeypatch)
pytests/test_celery_infrastructure.py:120
Functiontest_search_request_rejects_limit_above_max
()
pytests/test_edge_cases.py:193
Functiontest_search_results_proper_schema
Verify search returns SearchResultResponse schema
pytests/test_schema_validation.py:137
Functiontest_signup_new_user
(client)
pytests/test_users.py:1
Functiontest_success_response_schema
Verify success endpoints return SuccessResponse
pytests/test_schema_validation.py:167
Functiontest_task_listing_endpoints
(monkeypatch)
pytests/test_celery_infrastructure.py:84
Functiontest_task_status_endpoint_states
(monkeypatch)
pytests/test_celery_infrastructure.py:56
Functiontest_token_bucket_allows_burst_then_rejects
(monkeypatch)
pytests/test_rate_limit_service.py:8
Functiontest_token_bucket_refills_over_time
(monkeypatch)
pytests/test_rate_limit_service.py:26
Functiontest_transient_retry_retries_once_and_returns_value
()
pytests/test_concurrency_hardening.py:360
Functiontest_update_user_info
(client, get_token)
pytests/test_me.py:6
Functiontest_user_basic_response_in_followers
Verify followers/following return UserBasicResponse list
pytests/test_edge_cases.py:166
Functiontest_user_profile_response_structure
Verify UserProfileResponse schema
pytests/test_edge_cases.py:31
Functiontest_user_versioning_rejects_stale_update
(db_session_factory)
pytests/test_concurrency_hardening.py:331
Functiontest_validation_errors_are_clear
Verify Pydantic validation provides clear error messages
pytests/test_schema_validation.py:25
Functiontest_verify_email_request_rejects_invalid_otp_length
()
pytests/test_edge_cases.py:188
Functiontest_verify_email_then_login_works
(client)
pytests/test_auth.py:45
Functiontest_vote_on_nonexistent_post
(client,get_token)
pytests/test_votes.py:12
Functiontest_vote_on_post
(client, get_token)
pytests/test_votes.py:1
Functiontest_vote_response_includes_counts
Verify vote responses include like/dislike counts
pytests/test_schema_validation.py:117
Functiontest_vote_stats_response_schema
Verify VoteStatsResponse returns proper counts
pytests/test_edge_cases.py:45
Functiontest_ws_chat_connect
WebSocket test using sync TestClient. httpx.AsyncClient does not support WebSocket connections, so we use Starlette's TestClient which ha
pytests/test_chat.py:10
Functionunfollow_user
(user_id:int, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth2.getCurrentUser))
app/routes/connect.py:69
Functionuniversal_exception_handler
(request: Request, exc: Exception)
app/utils/exception_handlers.py:57
Functionunsave_post
( post_id: int, db_session: AsyncSession = Depends(db.getDb), current_user: models.User = Depends(
app/routes/saved.py:75
Functionupdate_comment
(commentId:int, request:sch.CommentUpdateRequest=Body(...), db:AsyncSession=Depends(db.getDb), currentUser: mo
app/routes/comment.py:80
Functionupdate_current_user_profile
(username:str=Form(None), bio:str=Form(None), profile_picture:UploadFile=File(None), db:AsyncSession=Depends(d
app/routes/me.py:148
Functionupdate_post
(postId:int, post:sch.PostUpdateRequest, db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(oauth
app/routes/posts.py:182
Functionupgrade
()
alembic/versions/a4d7c9e2b1f0_add_search_trgm_indexes.py:20
Functionupgrade
()
alembic/versions/e9b7c6a5d4f2_add_counter_triggers.py:19
Functionupgrade
()
alembic/versions/c1f4f99c7a10_add_saved_posts_table.py:21
Functionupgrade
Upgrade schema.
alembic/versions/6d3a844fb941_add_notifications_table.py:21
Functionupgrade
()
alembic/versions/b2c1e7d3f901_add_user_version_id_for_optimistic_locking.py:21
Functionupgrade
()
alembic/versions/f2a6c1d4b8e9_hash_auth_secrets.py:25
Functionupgrade
Upgrade schema.
alembic/versions/622ae475b8e8_fresh_start_all_models_in_one_migration.py:21
Functionupgrade
()
alembic/versions/f87ab2d91c3e_add_last_seen_at_to_users.py:21
Functionupgrade
()
alembic/versions/d8a5f4b7c2e1_harden_schema_indexes.py:60
Functionupgrade
()
alembic/versions/5ac7db1d4f3c_add_email_verified_to_users.py:21
Functionupgrade
Upgrade schema.
alembic/versions/9aafdcad5a6d_add_refresh_tokens_table.py:21
Functionvalidation_exception_handler
(request: Request, exc: RequestValidationError)
app/utils/exception_handlers.py:44
FunctionverifyAccesstoken
(token:str,credentials_exception,dbs:AsyncSession)
app/oauth2.py:116
FunctionverifyPassword
Verify a password against a bcrypt hash — offloaded to a thread pool.
app/utils/thread_helpers.py:31
Functionverify_email
(payload: sch.VerifyEmailRequest, db: AsyncSession = Depends(db.getDb))
app/routes/auth.py:148
FunctionvoteOnPost
(postId:int, post:sch.VoteRequest=Body(...), db:AsyncSession=Depends(getDb), currentUser:models.User=Depends(o
app/routes/like.py:21
← previous301–373 of 373, ranked by callers