Exemple #1
0
 def test_create_construct_all_fields(self):
     """This is a test for creating a new construct object, with only the all fields being entered"""
     test_construct = Construct(
          name = "test construct", 
          plasmid = "test plasmid",
          selection = Selection.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_construct.save()
     test_construct.researcher.add(Contact.objects.get(pk=1))
     test_construct.protein.add(Protein.objects.get(pk=1))
     test_construct.reference.add(Reference.objects.get(pk=1))
     self.assertEquals(test_construct.__unicode__(), "test construct")
Exemple #2
0
 def test_construct_slugify(self):
     """This is a test for the construct name being correctly slugified"""
     test_construct = Construct(name = "test construct")
     test_construct.save()
     self.assertEquals(test_construct.slug, "test-construct")
Exemple #3
0
 def test_create_cell_line_minimal(self):
     """This is a test for creating a new construct object, with only the minimum fields being entered"""
     test_construct = Construct(name = "test construct")
     test_construct.save()
     self.assertEquals(test_construct.__unicode__(), "test construct")