Merge branch 'develop' into testing
This commit is contained in:
		@@ -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
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
        )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user