Skip to content

test(conftest): migrate test_db.py local shadow card fixtures to uuid4() #52

Description

@ImmortalDemonGod

What

In tests/test_db.py, three local fixture implementations shadow the conftest.py card fixtures with the same constant UUID literals that F8 replaced in conftest:

  • Line 105: uuid.UUID("11111111-1111-1111-1111-111111111111")
  • Line 124: uuid.UUID("22222222-2222-2222-2222-222222222222")
  • Line 143: uuid.UUID("33333333-3333-3333-3333-333333333333")

Why deferred

F8 (PR fix/flashcore-F8) brought uuid4() into scope only for the shared conftest.py card fixtures (sample_card1, sample_card2, sample_card3_deck_b). The test_db.py shadow fixtures are independent — they are local to test_db.py and do not depend on conftest's UUID values, so changing them was outside F8's scope per plan §6: "Migrating test_db.py local shadow fixtures to uuid4() — each file's fixture convention is internally consistent; F8 only mandates conftest card fixtures." Classification: nice-to-have.

Acceptance criteria

  • tests/test_db.py local shadow fixtures for sample_card1, sample_card2, sample_card3_deck_b use uuid.uuid4() (or str(uuid.uuid4())) instead of hardcoded literal strings.
  • pytest tests/ -q --tb=short exits 0 with passed count ≥ 499, 1 skipped.
  • No other test file is broken by the change (conftest consumers and test_db.py are independent; the shadow fixtures only affect test_db.py scope).

References

  • Plan §6 deferred scope: .aiv/plans/flashcore-F8-plan.md §6
  • Canonical audit source (F8): https://github.com/ImmortalDemonGod/flashcore/blob/fb1ae5a1c1893939f4ff4f82cbd09d4e90f8e965/audit/02-static-audit.md#L18

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions