Made the test timezone aware, DateTimeFiled(auto_now_add) already was.
This commit is contained in:
parent
c78858c152
commit
aed2856df3
@ -2,6 +2,7 @@ import datetime
|
|||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
from django.utils import timezone
|
||||||
|
|
||||||
from lostplaces_app.models import Voucher
|
from lostplaces_app.models import Voucher
|
||||||
from lostplaces_app.tests.models import ModelTestCase
|
from lostplaces_app.tests.models import ModelTestCase
|
||||||
@ -10,7 +11,7 @@ from lostplaces_app.tests.models import ModelTestCase
|
|||||||
def mock_voucher():
|
def mock_voucher():
|
||||||
return Voucher.objects.create(
|
return Voucher.objects.create(
|
||||||
code='ayDraJCCwfhcFiYmSR5GrcjcchDfcahv',
|
code='ayDraJCCwfhcFiYmSR5GrcjcchDfcahv',
|
||||||
expires_when=datetime.datetime.now() + datetime.timedelta(days=1)
|
expires_when=timezone.now() + datetime.timedelta(days=1)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user