Пример #1
0
 def test_create_primer_all_fields(self):
     """This is a test for creating a new primer object, with only the all fields being entered"""
     test_primer = Primer(name="test primer",
                          primer_type="cloning",
                          date_ordered="2010-01-01",
                          sequence="ATGGCTTCTT",
                          location="-20",
                          box="sample box",
                          source="that guy",
                          vendor=Vendor.objects.get(pk=1),
                          notes="some notes on the object",
                          public=True,
                          published=True)
     test_primer.save()
     test_primer.researcher.add(Contact.objects.get(pk=1))
     test_primer.protein.add(Protein.objects.get(pk=1))
     test_primer.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_primer.__unicode__(), "test primer")
Пример #2
0
 def test_create_primer_all_fields(self):
     """This is a test for creating a new primer object, with only the all fields being entered"""
     test_primer = Primer(
          name = "test primer", 
          primer_type="cloning",
          date_ordered = "2010-01-01",
          sequence = "ATGGCTTCTT",
          location = "-20",
          box = "sample box",
          source = "that guy",
          vendor = Vendor.objects.get(pk=1),
          notes = "some notes on the object",
          public = True,
          published = True)
     test_primer.save()
     test_primer.researcher.add(Contact.objects.get(pk=1))
     test_primer.protein.add(Protein.objects.get(pk=1))
     test_primer.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_primer.__unicode__(), "test primer")
Пример #3
0
 def test_create_primer_minimal(self):
     """This is a test for creating a new primer object, with only the minimum fields being entered"""
     test_primer = Primer(name="test primer", primer_type="cloning")
     test_primer.save()
     self.assertEquals(test_primer.__unicode__(), "test primer")
Пример #4
0
 def test_create_primer_minimal(self):
     """This is a test for creating a new primer object, with only the minimum fields being entered"""
     test_primer = Primer(name = "test primer", primer_type="cloning")
     test_primer.save()
     self.assertEquals(test_primer.__unicode__(), "test primer")