Ejemplo n.º 1
0
 def test_create_strain_all_fields(self):
     """This is a test for creating a new strain object, with only the all fields being entered"""
     test_strain = Strain(
         name="test strain",
         background=Strain.objects.get(pk=1),
         selection=Selection.objects.get(pk=1),
         species="rabbit",
         strain_species=Species.objects.get(pk=1),
         genotype="MATa his3Δ1 leu2Δ0 lys2Δ0 ura3Δ0",
         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_strain.save()
     test_strain.researcher.add(Contact.objects.get(pk=1))
     test_strain.plasmids.add(Construct.objects.get(pk=1))
     test_strain.protein.add(Protein.objects.get(pk=1))
     test_strain.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_strain.__unicode__(), "test strain")
Ejemplo n.º 2
0
 def test_create_strain_all_fields(self):
     """This is a test for creating a new strain object, with only the all fields being entered"""
     test_strain = Strain(
         name = "test strain", 
         background = Strain.objects.get(pk=1),
         selection = Selection.objects.get(pk=1),
         species = "rabbit",
         strain_species = Species.objects.get(pk=1),
         genotype = "MATa his3Δ1 leu2Δ0 lys2Δ0 ura3Δ0",
         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_strain.save()
     test_strain.researcher.add(Contact.objects.get(pk=1))
     test_strain.plasmids.add(Construct.objects.get(pk=1))
     test_strain.protein.add(Protein.objects.get(pk=1))
     test_strain.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_strain.__unicode__(), "test strain")
Ejemplo n.º 3
0
 def test_strain_slugify(self):
     """This is a test for the cell line name being correctly slugified"""
     test_strain = Strain(name="test strain")
     test_strain.save()
     self.assertEquals(test_strain.slug, "test-strain")
Ejemplo n.º 4
0
 def test_create_strain_minimal(self):
     """This is a test for creating a new strain object, with only the minimum fields being entered"""
     test_strain = Strain(name="test strain")
     test_strain.save()
     self.assertEquals(test_strain.__unicode__(), "test strain")
Ejemplo n.º 5
0
 def test_strain_slugify(self):
     """This is a test for the cell line name being correctly slugified"""
     test_strain = Strain(name = "test strain")
     test_strain.save()
     self.assertEquals(test_strain.slug, "test-strain")
Ejemplo n.º 6
0
 def test_create_strain_minimal(self):
     """This is a test for creating a new strain object, with only the minimum fields being entered"""
     test_strain = Strain(name = "test strain")
     test_strain.save()
     self.assertEquals(test_strain.__unicode__(), "test strain")