Merge branch 'develop' into testing

This commit is contained in:
2020-09-12 08:38:37 +02:00
4 changed files with 13 additions and 12 deletions

View File

@@ -2,6 +2,7 @@ import datetime
from django.test import TestCase
from django.db import models
from django.utils import timezone
from lostplaces_app.models import Voucher
from lostplaces_app.tests.models import ModelTestCase
@@ -14,9 +15,9 @@ class VoucheTestCase(ModelTestCase, TestCase):
def setUpTestData(cls):
Voucher.objects.create(
code='ayDraJCCwfhcFiYmSR5GrcjcchDfcahv',
expires=datetime.datetime.now() + datetime.timedelta(days=1)
expires_when=timezone.now() + datetime.timedelta(days=1)
)
def test_voucher_code(self):
self._test_char_field(
'code',
@@ -45,4 +46,4 @@ class VoucheTestCase(ModelTestCase, TestCase):
msg='Expecting %s.__str__ to contain the voucher code' % (
self.model_name
)
)
)