mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Fixes #5328: Fix CreatedUpdatedFilterTest when running in non-UTC timezone
This commit is contained in:
parent
bf836d4d46
commit
ab33b3aa84
@ -12,6 +12,7 @@
|
|||||||
* [#5271](https://github.com/netbox-community/netbox/issues/5271) - Fix auto-population of region field when editing a device
|
* [#5271](https://github.com/netbox-community/netbox/issues/5271) - Fix auto-population of region field when editing a device
|
||||||
* [#5314](https://github.com/netbox-community/netbox/issues/5314) - Fix config context rendering when multiple tags are assigned to an object
|
* [#5314](https://github.com/netbox-community/netbox/issues/5314) - Fix config context rendering when multiple tags are assigned to an object
|
||||||
* [#5324](https://github.com/netbox-community/netbox/issues/5324) - Add missing template extension tags for plugins for VM interface view
|
* [#5324](https://github.com/netbox-community/netbox/issues/5324) - Add missing template extension tags for plugins for VM interface view
|
||||||
|
* [#5328](https://github.com/netbox-community/netbox/issues/5328) - Fix CreatedUpdatedFilterTest when running in non-UTC timezone
|
||||||
* [#5331](https://github.com/netbox-community/netbox/issues/5331) - Fix filtering of sites by null region
|
* [#5331](https://github.com/netbox-community/netbox/issues/5331) - Fix filtering of sites by null region
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ from unittest import skipIf
|
|||||||
|
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils import timezone
|
from django.utils.timezone import make_aware
|
||||||
from django_rq.queues import get_connection
|
from django_rq.queues import get_connection
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
from rq import Worker
|
from rq import Worker
|
||||||
@ -369,8 +369,8 @@ class CreatedUpdatedFilterTest(APITestCase):
|
|||||||
|
|
||||||
# change the created and last_updated of one
|
# change the created and last_updated of one
|
||||||
Rack.objects.filter(pk=self.rack2.pk).update(
|
Rack.objects.filter(pk=self.rack2.pk).update(
|
||||||
last_updated=datetime.datetime(2001, 2, 3, 1, 2, 3, 4, tzinfo=timezone.utc),
|
last_updated=make_aware(datetime.datetime(2001, 2, 3, 1, 2, 3, 4)),
|
||||||
created=datetime.datetime(2001, 2, 3)
|
created=make_aware(datetime.datetime(2001, 2, 3))
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_get_rack_created(self):
|
def test_get_rack_created(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user