Skip to content
Snippets Groups Projects
Commit 385486a2 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Move the factories around

parent 21daa467
No related branches found
No related tags found
No related merge requests found
from .models import *
from .blocks import *
import wagtail_factories
from opentech.apply.funds.blocks import CustomFormFieldsBlock
class CustomFormBlockFactory(wagtail_factories.StructBlockFactory):
class Meta:
model = CustomFormFieldsBlock
......@@ -7,6 +7,8 @@ import wagtail_factories
from opentech.apply.funds.models import ApplicationForm, FundType, FundForm, Round
from opentech.apply.funds.workflow import Action, Phase, Stage, Workflow
from .blocks import CustomFormBlockFactory
class ListSubFactory(factory.SubFactory):
def __init__(self, *args, count=0, **kwargs):
......@@ -137,6 +139,7 @@ class ApplicationFormFactory(factory.DjangoModelFactory):
model = ApplicationForm
name = factory.Faker('word')
form_fields = wagtail_factories.StreamFieldFactory({'field': CustomFormBlockFactory})
class RoundFactory(wagtail_factories.PageFactory):
......
......@@ -124,3 +124,8 @@ class TestRoundModel(TestCase):
with self.assertRaises(ValidationError):
new_round.clean()
class TestFormSubmission(TestCase):
def test_can_submit_if_new(self):
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment