[SupplierOrders] - Write Failing DB Tests for CRUD Operations #155

Closed
opened 2025-12-05 17:43:28 +00:00 by GFMpt13 · 0 comments
GFMpt13 commented 2025-12-05 17:43:28 +00:00 (Migrated from github.com)

Following TDD, write tests before implementation. These tests will fail, as the interface methods are currently empty stubs.

Tasks:

  • Set up the pytest file: tests/test_repos/test_supplier_orders.py.

  • Create necessary fixtures (e.g., sample_supplier_order).

  • Write tests for:

    • test_create_supplier_order_general_success (General supplies, no WorkOrder ID).
    • test_create_supplier_order_linked_success (Linked to a WorkOrder).
    • test_get_supplier_order_by_id_success.
    • test_get_supplier_order_by_id_not_found.
    • test_get_by_work_order_id_returns_list.
    • test_get_by_status_returns_list.
    • test_update_supplier_order_status (e.g., changing Pending -> Ordered).
    • test_delete_supplier_order_success.
  • Run uv run pytest and confirm all new tests fail with NotImplementedError.

Following TDD, write tests before implementation. These tests will fail, as the interface methods are currently empty stubs. Tasks: - [x] Set up the pytest file: tests/test_repos/test_supplier_orders.py. - [x] Create necessary fixtures (e.g., sample_supplier_order). - [x] Write tests for: - test_create_supplier_order_general_success (General supplies, no WorkOrder ID). - test_create_supplier_order_linked_success (Linked to a WorkOrder). - test_get_supplier_order_by_id_success. - test_get_supplier_order_by_id_not_found. - test_get_by_work_order_id_returns_list. - test_get_by_status_returns_list. - test_update_supplier_order_status (e.g., changing Pending -> Ordered). - test_delete_supplier_order_success. - [x] Run uv run pytest and confirm all new tests fail with NotImplementedError.
Sign in to join this conversation.
No description provided.