def test_create_chemical_all_fields(self): """This is a test for creating a new chemical object, with only the all fields being entered""" test_chemical = Chemical(name="test chemical", cas="53123-88-9", 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_chemical.save() test_chemical.researcher.add(Contact.objects.get(pk=1)) test_chemical.protein.add(Protein.objects.get(pk=1)) test_chemical.reference.add(Reference.objects.get(pk=1)) self.assertEquals(test_chemical.__unicode__(), "test chemical")
def test_create_chemical_all_fields(self): """This is a test for creating a new chemical object, with only the all fields being entered""" test_chemical = Chemical( name = "test chemical", cas = "53123-88-9", 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_chemical.save() test_chemical.researcher.add(Contact.objects.get(pk=1)) test_chemical.protein.add(Protein.objects.get(pk=1)) test_chemical.reference.add(Reference.objects.get(pk=1)) self.assertEquals(test_chemical.__unicode__(), "test chemical")
def test_chemical_slugify(self): """This is a test for the cell line name being correctly slugified""" test_chemical = Chemical(name="test chemical") test_chemical.save() self.assertEquals(test_chemical.slug, "test-chemical")
def test_create_chemical_minimal(self): """This is a test for creating a new chemical object, with only the minimum fields being entered""" test_chemical = Chemical(name="test chemical") test_chemical.save() self.assertEquals(test_chemical.__unicode__(), "test chemical")
def test_chemical_slugify(self): """This is a test for the cell line name being correctly slugified""" test_chemical = Chemical(name = "test chemical") test_chemical.save() self.assertEquals(test_chemical.slug, "test-chemical")
def test_create_chemical_minimal(self): """This is a test for creating a new chemical object, with only the minimum fields being entered""" test_chemical = Chemical(name = "test chemical") test_chemical.save() self.assertEquals(test_chemical.__unicode__(), "test chemical")