Skip to content

test: standardize mock return values to fix NoneType attribute error#148

Open
vipu2404-cyber wants to merge 23 commits into
vanshaggarwal27:mainfrom
vipu2404-cyber:feature/async-task-concurrency
Open

test: standardize mock return values to fix NoneType attribute error#148
vipu2404-cyber wants to merge 23 commits into
vanshaggarwal27:mainfrom
vipu2404-cyber:feature/async-task-concurrency

Conversation

@vipu2404-cyber

Copy link
Copy Markdown
Contributor

Closes #31

Changes Made

  • Fixed an AttributeError: 'NoneType' object has no attribute 'args' issue where mock_generate_blog returned a NoneType value during route invocation.
  • Explicitly set .return_value on mock dependencies within the integration test block to stabilize the route testing framework.

@vipu2404-cyber vipu2404-cyber force-pushed the feature/async-task-concurrency branch from 9ede3ba to 3941a8c Compare June 2, 2026 08:52
@vipu2404-cyber

Copy link
Copy Markdown
Contributor Author

🚀 Ready for Review & Merge

Hello! I have fully resolved the failing test suites and synchronized them with the updated parallel architecture.

Summary of Changes:

  • Fixed CI Pipeline Breakages: Patched the integration routes (test_routes.py) by correctly populating required mock attributes (mock_generate_blog.return_value).
  • Synchronized Scheduler Tests: Updated test_reminder_scheduler.py to match the new asynchronous, parallelized workflow logic (_check_unsolved_users_async) and fixed the timezone calculation failures by appropriately patching datetime.now.
  • Cleaned Codebase: Resolved stray git merge conflicts and ran ruff to ensure 100% compliant formatting across the test suite.

All local and CI checks are now green. Ready for your review and merge!
@vanshaggarwal27

@vanshaggarwal27

Copy link
Copy Markdown
Owner

Please resolve merge conflict

@vipu2404-cyber vipu2404-cyber force-pushed the feature/async-task-concurrency branch 2 times, most recently from 3c25d74 to b933d39 Compare June 3, 2026 09:05
@vanshaggarwal27

Copy link
Copy Markdown
Owner

Please fix Lint error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bug Fix: Prevent Duplicate Blog Generation Requests caused by isProcessing Timeout Race Condition

2 participants