Пример #1
0
 def test_ontology_patch_handler_errors(self):
     # Operation not supported
     obs = ontology_patch_handler('replace', '/ENA/', 'TERM')
     exp = {'status': 'error',
            'message': 'Operation "replace" not supported. '
                       'Current supported operations: add'}
     self.assertEqual(obs, exp)
     # Incorrect path parameter
     obs = ontology_patch_handler('add', '/ENA/Metagenomics', 'TERM')
     exp = {'status': 'error', 'message': 'Incorrect path parameter'}
     self.assertEqual(obs, exp)
     # Ontology does not exist
     obs = ontology_patch_handler('add', '/ONTOLOGY/', 'TERM')
     exp = {'status': 'error',
            'message': 'Ontology "ONTOLOGY" does not exist'}
     self.assertEqual(obs, exp)
Пример #2
0
 def test_ontology_patch_handler(self):
     obs = ontology_patch_handler('add', '/ENA/', 'TERM')
     exp = {'status': 'success', 'message': ''}
     self.assertEqual(obs, exp)
Пример #3
0
 def test_ontology_patch_handler(self):
     obs = ontology_patch_handler('add', '/ENA/', 'TERM')
     exp = {'status': 'success', 'message': ''}
     self.assertEqual(obs, exp)