Skip to content

Commit

Permalink
v9.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Dec 5, 2023
1 parent 973d776 commit 8a93296
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ dependencies = [
[project.optional-dependencies]
dev = [
'typer~=0.9',
'freezegun~=1.2',
'pytest-django~=4.5',
'pytest-mock~=3.10',
'freezegun~=1.3',
'pytest-django~=4.7',
'pytest-mock~=3.12',
'coverage~=7.3',
'pre-commit~=3.5',
'ruff~=0.1',
'ruff~=0.1.7',
'sphinx==4.2.0',
'sphinx-rtd-theme==1.0.0',
'm2r2==0.3.1',
'mistune<2.0.0',
'ambient-package-update~=23.12.2',
'ambient-package-update~=23.12.3',
'gevent~=23.9',
]
drf = [
Expand Down
6 changes: 3 additions & 3 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_save_update_fields_common_fields_set(self):
obj.refresh_from_db()
self.assertEqual(obj.value, 2)
self.assertEqual(obj.value_b, 1, "value_b should not have changed")
self.assertEqual(obj.lastmodified_at, datetime.datetime(2022, 6, 26, 10))
self.assertEqual(obj.lastmodified_at, datetime.datetime(2022, 6, 26, 10, tzinfo=datetime.timezone.utc))

@patch("testapp.models.CommonInfoBasedModel.ALWAYS_UPDATE_FIELDS", new_callable=PropertyMock)
@freeze_time("2022-06-26 10:00")
Expand All @@ -49,7 +49,7 @@ def test_save_update_fields_common_fields_set_without_always_update(self, always

obj.refresh_from_db()
self.assertEqual(obj.value, 2)
self.assertEqual(obj.lastmodified_at, datetime.datetime(2020, 9, 19))
self.assertEqual(obj.lastmodified_at, datetime.datetime(2020, 9, 19, tzinfo=datetime.timezone.utc))

@freeze_time("2022-06-26 10:00")
def test_save_common_fields_set_without_update_fields(self):
Expand All @@ -60,4 +60,4 @@ def test_save_common_fields_set_without_update_fields(self):

obj.refresh_from_db()
self.assertEqual(obj.value, 2)
self.assertEqual(obj.lastmodified_at, datetime.datetime(2022, 6, 26, 10))
self.assertEqual(obj.lastmodified_at, datetime.datetime(2022, 6, 26, 10, tzinfo=datetime.timezone.utc))

0 comments on commit 8a93296

Please sign in to comment.