Example #1
0
 def test_field_schema(self, patient_list):
     patient_list.return_value = [test_patient_lists.TaggingTestPatientList]
     expected = [
         {'name': 'eater', 'title': 'Eater', 'type': 'boolean'},
         {'type': 'boolean', 'name': 'herbivore', 'title': 'Herbivore'}
     ]
     schema = Tagging.build_field_schema()
     self.assertEqual(expected, schema)
Example #2
0
 def test_field_schema(self):
     names = ['eater', 'herbivore', 'carnivore']
     fields = [{'name': tagname, 'type': 'boolean'} for tagname in names]
     schema = Tagging.build_field_schema()
     for field in fields:
         self.assertIn(field, schema)