Skip to content

test(orm): move + convert model query tests to sqlite base TestCase - #209

Merged
tmgbedu merged 2 commits into
mainfrom
test/model-query-sqlite-conversion
Aug 22, 2026
Merged

test(orm): move + convert model query tests to sqlite base TestCase#209
tmgbedu merged 2 commits into
mainfrom
test/model-query-sqlite-conversion

Conversation

@tmgbedu

@tmgbedu tmgbedu commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Relocate tests/masoniteorm/models/test_model_query.py to tests/masoniteorm/sqlite/models/test_sqlite_model_query.py and convert it from self-contained pytest fixtures to the shared sqlite TestCase.

  • Seed a third user (Alice) on top of the shared seeder's Joe/Jane and rewrite all 44 assertions against that 3-user dataset.
  • Narrow now-Optional first()/find() results with assert ... is not None.
  • Route exists tests through User.query().where(...).

Relocate tests/masoniteorm/models/test_model_query.py to
tests/masoniteorm/sqlite/models/test_sqlite_model_query.py and convert
it from self-contained pytest fixtures to the shared sqlite TestCase.

- Seed a third user (Alice) on top of the shared seeder's Joe/Jane and
  rewrite all 44 assertions against that 3-user dataset.
- Narrow now-Optional first()/find() results with `assert ... is not None`.
- Route exists tests through User.query().where(...).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Collapse chained query calls onto single lines so 'ruff format --check' passes.
@tmgbedu
tmgbedu merged commit c9e0067 into main Aug 22, 2026
6 checks passed
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.

1 participant