Ejemplo n.º 1
0
 def test_create_control_sample_type(self):
     SampleComposition.create_control_sample_type('testing.control',
                                                  'A test')
     obs = SampleComposition.get_control_sample_types_description()
     exp = [{
         'external_id':
         'blank',
         'description':
         'gDNA extraction blanks. Represents an empty '
         'extraction well.'
     }, {
         'external_id':
         'empty',
         'description':
         'Empty well. Represents an empty well that should '
         'not be included in library preparation.'
     }, {
         'external_id': 'testing.control',
         'description': 'A test'
     }, {
         'external_id':
         'vibrio.positive.control',
         'description':
         'Bacterial isolate control (Vibrio fischeri ES114)'
         '. Represents an extraction well loaded with '
         'Vibrio.'
     }, {
         'external_id':
         'zymo.mock',
         'description':
         'Bacterial community control (Zymo Mock D6306). '
         'Represents an extraction well loaded with Zymo '
         'Mock community.'
     }]
     self.assertEqual(obs, exp)
Ejemplo n.º 2
0
    def post(self):
        external_id = self.get_argument('external_id')
        description = self.get_argument('description')

        SampleComposition.create_control_sample_type(external_id, description)
        self.finish()