AOSSIE-Org / EduAid

A tool that can auto-generate short quizzes on the basis of the content provided.
22 stars 52 forks source link

Write Unit Tests for backend #69

Open yashpandey06 opened 5 days ago

yashpandey06 commented 5 days ago

Tasks

  1. Set Up Testing Framework:

    • Install and configure pytest and pytest-flask for testing the application.
  2. Write Unit Tests for Routes:

    • Test each endpoint for expected behavior (e.g., HTTP status codes, JSON response structure, query parameters, and path parameters).
  3. Test Dependencies:

    • Mock external dependencies (e.g., databases, third-party APIs) using unittest.mock or pytest-mock.
  4. Test Application Context:

    • Ensure proper testing of the Flask app context and configurations.
  5. Organize Tests:

    • Place test files in the tests/ directory.
    • Use meaningful test function names and group related tests into separate files.
  6. Document Test Instructions:

    • Update the project README or contributing guide with steps to run tests locally.

Acceptance Criteria


References

Roaster05 commented 5 hours ago

you can proceed with this @yashpandey06

yashpandey06 commented 5 hours ago

you can proceed with this @yashpandey06

Ok thanks !