예제 #1
0
 def test_create_antibody_all_fields(self):
     """This is a test for creating a new antibody object, with only the all fields being entered"""
     test_antibody = Antibody(name="test antibody",
                              protein_size="120 kDa",
                              source_species="rabbit",
                              catalog="abc1234",
                              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_antibody.save()
     test_antibody.researcher.add(Contact.objects.get(pk=1))
     test_antibody.protein.add(Protein.objects.get(pk=1))
     test_antibody.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_antibody.__unicode__(), "test antibody")
예제 #2
0
 def test_create_antibody_all_fields(self):
     """This is a test for creating a new antibody object, with only the all fields being entered"""
     test_antibody = Antibody(
          name = "test antibody", 
          protein_size = "120 kDa",
          source_species = "rabbit",
          catalog = "abc1234",
          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_antibody.save()
     test_antibody.researcher.add(Contact.objects.get(pk=1))
     test_antibody.protein.add(Protein.objects.get(pk=1))
     test_antibody.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_antibody.__unicode__(), "test antibody")
예제 #3
0
 def test_antibody_slugify(self):
     """This is a test for the antibody name being correctly slugified"""
     test_antibody = Antibody(name="test antibody", source_species="rabbit")
     test_antibody.save()
     self.assertEquals(test_antibody.slug, "test-antibody")
예제 #4
0
 def test_create_antibody_minimal(self):
     """This is a test for creating a new antibody object, with only the minimum fields being entered"""
     test_antibody = Antibody(name="test antibody", source_species="rabbit")
     test_antibody.save()
     self.assertEquals(test_antibody.__unicode__(), "test antibody")
예제 #5
0
 def test_antibody_slugify(self):
     """This is a test for the antibody name being correctly slugified"""
     test_antibody = Antibody(name = "test antibody", source_species = "rabbit")
     test_antibody.save()
     self.assertEquals(test_antibody.slug, "test-antibody")
예제 #6
0
 def test_create_antibody_minimal(self):
     """This is a test for creating a new antibody object, with only the minimum fields being entered"""
     test_antibody = Antibody(name = "test antibody", source_species = "rabbit")
     test_antibody.save()
     self.assertEquals(test_antibody.__unicode__(), "test antibody")