Skip to content
Snippets Groups Projects

Resolve "list of subjects should contain columns dependent on the study"

1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -3,7 +3,7 @@ import logging
from web.forms import StudySubjectEditForm
from web.models import StudySubject
from web.tests import LoggedInWithWorkerTestCase
from web.tests.functions import create_study_subject
from web.tests.functions import create_study_subject, create_empty_study
logger = logging.getLogger(__name__)
@@ -31,6 +31,14 @@ class StudySubjectEditFormTests(LoggedInWithWorkerTestCase):
save_status = edit_form.is_valid()
self.assertTrue(save_status)
def test_validation_with_empty_study(self):
self.study_subject.study = create_empty_study()
self.study_subject.save()
edit_form = StudySubjectEditForm(self.sample_data)
save_status = edit_form.is_valid()
self.assertTrue(save_status)
def test_invalid_nd_number_edit(self):
study_subject2 = create_study_subject(124)
study_subject2.nd_number = "ND0124"
Loading