Beispiel #1
0
 def test_create_cell_line_all_fields(self):
     """This is a test for creating a new cell_line object, with only the all fields being entered"""
     test_cell_line = Cell(
          name = "test cell_line", 
          description = "test cell line description",
          species = "rabbit",
          cell_line_species = Species.objects.get(pk=1),
          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_cell_line.save()
     test_cell_line.researcher.add(Contact.objects.get(pk=1))
     test_cell_line.protein.add(Protein.objects.get(pk=1))
     test_cell_line.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_cell_line.__unicode__(), "test cell_line")
Beispiel #2
0
 def test_cell_line_slugify(self):
     """This is a test for the cell line name being correctly slugified"""
     test_cell_line = Cell(name = "test cell line")
     test_cell_line.save()
     self.assertEquals(test_cell_line.slug, "test-cell-line")
Beispiel #3
0
 def test_create_cell_line_minimal(self):
     """This is a test for creating a new cell line object, with only the minimum fields being entered"""
     test_cell_line = Cell(name = "test cell line")
     test_cell_line.save()
     self.assertEquals(test_cell_line.__unicode__(), "test cell line")