Beispiel #1
0
 def test_create_studey_detailed(self):
     """This is a test for creating a new study object, with all fields being entered.  It also verifies that unicode is set correctly.  This test is dependent on the ability to create a new Strain object (see animal.tests.StrainModelTests.test_create_minimal_strain)."""
     new_study = Study(
         description = "Effects of x on y",
         start_date = datetime.date.today(),
         stop_date = datetime.date.today(),
         notes = "some notes on this strain"
         )
     new_study.save()
     new_study.strain.create(Strain='test_strain')
     self.assertEquals(new_study.__unicode__(), u'Effects of x on y')
Beispiel #2
0
 def test_create_study_minimal(self):
     """This is a test for creating a new study object, with only the minimum being entered.  It also verifies that unicode is set correctly."""
     new_study = Study(description = "Effects of x on y")
     new_study.save()
     self.assertEquals(new_study.__unicode__(), u'Effects of x on y')