fix broken tests#200
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes broken integration tests after an API change. The main updates are adding timezone-aware datetime handling for completed tasks and new unknown fields in model classes.
- Imports UTC timezone for proper datetime handling
- Adds
completed_timefield with UTC timezone to test task data - Adds
backgroundfield placeholder to ProjectV2 and ProjectGroupV2 models
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/integration/v2/test_closed.py | Imports UTC and adds completed_time with UTC timezone to task test data |
| src/pyticktick/models/v2/models.py | Adds background field placeholder to ProjectV2 and ProjectGroupV2 models |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
|
|
||
| # unknown fields | ||
| background: None |
There was a problem hiding this comment.
The background field lacks a type annotation. Consider using background: None = None to properly type hint this as an optional field that defaults to None, or background: Optional[str] = None if it should accept string values.
| ) | ||
|
|
||
| # unknown fields | ||
| background: None |
There was a problem hiding this comment.
The background field lacks a type annotation. Consider using background: None = None to properly type hint this as an optional field that defaults to None, or background: Optional[str] = None if it should accept string values.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
This just fixes existing tests as the API has changed. This does not include new functionality.