Skip to content

Conversation

@nishika26
Copy link
Collaborator

@nishika26 nishika26 commented Jul 8, 2025

Summary

Target issue is #268
Explain the motivation for making this change. What existing problem does the pull request solve?
Refer this document for additional context - https://docs.google.com/document/d/1pJsZOLKO-4HI1mu_DkZQ_bIfKsNymo-dQmNKIH8O1qQ/edit?usp=sharing

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

  • Moved seed data loading to conftest.py:
    • The load_seed_data fixture was previously defined in individual test files that needed seeding.

It is now moved to conftest.py with:

@pytest.fixture(scope="session", autouse=True)
def load_seed_data(db):
    seed_database(db)
    yield
  • scope="session" ensures that seed data is loaded once for the entire test run, as it’s used in a read-only manner.

@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@nishika26 nishika26 changed the title utility functions and seeding fixture Testing: Centralized Seed Data & Utility Functions for Test Setup Jul 8, 2025
@nishika26 nishika26 self-assigned this Jul 8, 2025
@nishika26 nishika26 added the bug Something isn't working label Jul 8, 2025
@nishika26 nishika26 moved this to In Progress in Dev Priorities Jul 8, 2025
@nishika26 nishika26 linked an issue Jul 8, 2025 that may be closed by this pull request
@nishika26 nishika26 marked this pull request as ready for review July 9, 2025 05:56
@nishika26 nishika26 changed the title Testing: Centralized Seed Data & Utility Functions for Test Setup Testing: Centralized Seed Data fixture for Test Setup Jul 9, 2025
@nishika26 nishika26 changed the title Testing: Centralized Seed Data fixture for Test Setup Testing: Centralized Seed Data fixture Jul 9, 2025
@nishika26 nishika26 merged commit 1b6c7fa into main Jul 9, 2025
2 checks passed
@nishika26 nishika26 deleted the bug/seed_data_fix branch July 9, 2025 11:22
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Dev Priorities Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready-for-review

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

Tesing : Create a common fixture in conftest.py for seeding database

3 participants