Пример #1
0
 def test_list_studies(self):
     obs = Study.list_studies()
     exp = [{'study_id': 1,
             'study_title': 'Identification of the Microbiomes for '
                            'Cannabis Soils',
             'study_alias': 'Cannabis Soils',
             'owner': '*****@*****.**',
             'num_samples': 27}]
     self.assertEqual(obs, exp)
Пример #2
0
 def get(self):
     # Get all arguments that DataTables send us
     res = {
         "data": [[
             s['study_id'], s['study_title'], s['study_alias'], s['owner'],
             s['num_samples']
         ] for s in Study.list_studies()]
     }
     self.write(res)
     self.finish()