def setUp(self): self.big_project = TestCaseDirectory.objects(name="BigProject") # testcases manager = TestCase.objects self.tc_z = manager.create(parent=self.big_project, name='z') self.tc_x = manager.create(parent=self.big_project, name='x') self.tc_a = manager.create(parent=self.big_project, name='b') # testcase directories manager = TestCaseDirectory.objects self.tcd_z = manager.create(parent=self.big_project, name='z') self.tcd_x = manager.create(parent=self.big_project, name='x') self.tcd_a = manager.create(parent=self.big_project, name='b')
def test_directory_name_and_parent_should_be_unique_on_model_full_clean(self): new_big_project = TestCaseDirectory(**self.data_that_should_cause_an_error()) new_big_project.full_clean()