Skip to content

Move tests to top level - #37

Merged
tmgbedu merged 6 commits into
feature/fix-testsfrom
move-tests-to-top-level
May 2, 2026
Merged

Move tests to top level#37
tmgbedu merged 6 commits into
feature/fix-testsfrom
move-tests-to-top-level

Conversation

@tmgbedu

@tmgbedu tmgbedu commented May 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

tmgbedu and others added 6 commits May 1, 2026 16:37
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add __init__.py files for relative imports across test packages
- Add conftest.py to boot minimal Application (needed by ConnectionFactory)
- Fix all `fastapi_startkit.orm.*` imports → `fastapi_startkit.masoniteorm.*`
- Fix config format: flat dict → nested `connections` key
- Fix fixtures/model.py: import Field from masoniteorm.models.fields
- Use RefreshDatabase trait in sqlite TestCase with overridden migrate_database
- Fix sqlite test imports to use relative paths
- Fix builder.py: `primary_key` → `__primary_key__` in find()
- Add or_where() to QueryBuilder using QueryExpression keyword="or"
- Fix test_model_attributes: correct config key access and unsupported driver name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove duplicate skipped test_can_find_list (find() is now implemented)
- Update expected SQL to include LIMIT 1 (find calls first())
- Call DB.clear() before wipe() in setUp/tearDown so mocked connections
  do not corrupt get_all_tables() in subsequent tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rewrite test_collection.py to use fixture User/DB/migrate and sqlite TestCase
- Remove Factory dependency (not implemented) — use direct model instances
- Remove Schema old-API setup — migrate_database() from TestCase handles it
- Fix group_by assertIsInstance to not depend on specific Collection class

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tmgbedu
tmgbedu merged commit e51ed5c into feature/fix-tests May 2, 2026
0 of 3 checks passed
@tmgbedu
tmgbedu deleted the move-tests-to-top-level branch May 2, 2026 04:48
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