Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""
Check that IProject(user_id).get_user_inbox_project() returns properly for all users.
Iterates all non-deleted users in batches from the main DB, calls
IProject(user.id).get_user_inbox_project() for each, and reports:
- ok: Returns ProjectView whose id matches user.inbox_project_id
- mismatch: Returns project with different id than user.inbox_project_id
- not_found: UserInboxNotFoundError raised but user has inbox_project_id set
#!/usr/bin/env python
"""
Check that IProject(user_id).get_user_inbox_project() returns properly for all users.
Iterates all non-deleted users in batches from the main DB, calls
IProject(user.id).get_user_inbox_project() for each, and reports:
- ok: Returns ProjectView whose id matches user.inbox_project_id
- mismatch: Returns project with different id than user.inbox_project_id
- not_found: UserInboxNotFoundError raised but user has inbox_project_id set