Skip to content
Snippets Groups Projects
Commit 1f4e275a authored by Erin Mullaney's avatar Erin Mullaney
Browse files

#805 screening factory and 1st test

parent e538baec
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ from opentech.apply.funds.models import ( ...@@ -10,6 +10,7 @@ from opentech.apply.funds.models import (
LabType, LabType,
RequestForPartners, RequestForPartners,
Round, Round,
ScreeningStatus,
SealedRound, SealedRound,
) )
from opentech.apply.funds.models.forms import ( from opentech.apply.funds.models.forms import (
...@@ -43,6 +44,7 @@ __all__ = [ ...@@ -43,6 +44,7 @@ __all__ = [
'LabBaseFormFactory', 'LabBaseFormFactory',
'LabSubmissionFactory', 'LabSubmissionFactory',
'RequestForPartnersFactory', 'RequestForPartnersFactory',
'ScreeningStatusFactory',
'SealedRoundFactory', 'SealedRoundFactory',
'SealedSubmissionFactory', 'SealedSubmissionFactory',
'TodayRoundFactory', 'TodayRoundFactory',
...@@ -311,3 +313,10 @@ class LabBaseReviewFormFactory(AbstractReviewFormFactory): ...@@ -311,3 +313,10 @@ class LabBaseReviewFormFactory(AbstractReviewFormFactory):
model = LabBaseReviewForm model = LabBaseReviewForm
lab = factory.SubFactory(LabFactory) lab = factory.SubFactory(LabFactory)
class ScreeningStatusFactory(factory.DjangoModelFactory):
class Meta:
model = ScreeningStatus
title = factory.Iterator(["Bad", "Good"])
...@@ -10,6 +10,7 @@ from opentech.apply.funds.tests.factories import ( ...@@ -10,6 +10,7 @@ from opentech.apply.funds.tests.factories import (
LabFactory, LabFactory,
LabSubmissionFactory, LabSubmissionFactory,
RoundFactory, RoundFactory,
ScreeningStatusFactory,
SealedRoundFactory, SealedRoundFactory,
SealedSubmissionFactory, SealedSubmissionFactory,
) )
...@@ -182,6 +183,12 @@ class TestStaffSubmissionView(BaseSubmissionViewTestCase): ...@@ -182,6 +183,12 @@ class TestStaffSubmissionView(BaseSubmissionViewTestCase):
response = self.get_page(submission) response = self.get_page(submission)
self.assertNotContains(response, 'Value') self.assertNotContains(response, 'Value')
def test_can_screen_submission(self):
screening_outcome = ScreeningStatusFactory()
self.post_page(self.submission, {'form-submitted-screening_form': '', 'screening_status': screening_outcome.id})
submission = self.refresh(self.submission)
self.assertEqual(submission.screening_status, screening_outcome)
class TestReviewersUpdateView(BaseSubmissionViewTestCase): class TestReviewersUpdateView(BaseSubmissionViewTestCase):
user_factory = StaffFactory user_factory = StaffFactory
......
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