Rename ExplorerCreationForm to SignupVoucherForm.
This commit is contained in:
@@ -4,15 +4,15 @@ from django import forms
|
||||
from django.utils import timezone
|
||||
|
||||
from lostplaces.tests.forms import FormTestCase
|
||||
from lostplaces.forms import ExplorerCreationForm
|
||||
from lostplaces.forms import SignupVoucherForm
|
||||
from lostplaces.models.models import Voucher
|
||||
|
||||
class ExplorerCreationFormTestCase(FormTestCase):
|
||||
class SignupVoucherFormTestCase(FormTestCase):
|
||||
"""
|
||||
This test case only tests for the voucher since all other aspects don't realy matter
|
||||
to this project and are already tested by django
|
||||
"""
|
||||
form = ExplorerCreationForm
|
||||
form = SignupVoucherForm
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
@@ -37,7 +37,7 @@ class ExplorerCreationFormTestCase(FormTestCase):
|
||||
)
|
||||
|
||||
def test_validation_valid(self):
|
||||
form = ExplorerCreationForm(self.post_data)
|
||||
form = SignupVoucherForm(self.post_data)
|
||||
self.assertTrue(
|
||||
form.is_valid(),
|
||||
msg='Expecting the %s to validate' % (
|
||||
@@ -49,7 +49,7 @@ class ExplorerCreationFormTestCase(FormTestCase):
|
||||
self.post_data = {
|
||||
'voucher': 'Imanotacode123'
|
||||
}
|
||||
form = ExplorerCreationForm(self.post_data)
|
||||
form = SignupVoucherForm(self.post_data)
|
||||
self.assertFalse(
|
||||
form.is_valid(),
|
||||
msg='Expecting the %s to not validate' % (
|
||||
|
Reference in New Issue
Block a user