mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Annotate the test_models package
This commit is contained in:
parent
e4c88103f5
commit
949d110d04
2 changed files with 4 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ from tests.models import CustomManagerStatusModel, Status, StatusPlainTuple
|
|||
|
||||
|
||||
class StatusModelTests(TestCase):
|
||||
model: type[Status] | type[StatusPlainTuple]
|
||||
|
||||
def setUp(self) -> None:
|
||||
self.model = Status
|
||||
self.on_hold = Status.STATUS.on_hold
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Iterable
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
import time_machine
|
||||
|
|
@ -114,7 +115,7 @@ class TimeStampedModelTests(TestCase):
|
|||
self.assertEqual(t1.modified, datetime(2020, 1, 2, tzinfo=timezone.utc))
|
||||
|
||||
def test_save_is_skipped_for_empty_update_fields_iterable(self) -> None:
|
||||
tests = (
|
||||
tests: Iterable[Iterable[str]] = (
|
||||
[], # list
|
||||
(), # tuple
|
||||
set(), # set
|
||||
|
|
|
|||
Loading…
Reference in a new issue