[879b32]: / qiita_pet / test / test_ontology.py

Download this file

26 lines (19 with data), 852 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
from unittest import main
from json import loads
from qiita_pet.test.tornado_test_base import TestHandlerBase
class TestOntologyHandler(TestHandlerBase):
def test_patch(self):
arguments = {'op': 'add', 'path': 'ENA', 'value': 'new-term'}
response = self.patch('/ontology/', data=arguments)
self.assertEqual(response.code, 200)
exp = {'status': 'success', 'message': ''}
self.assertEqual(loads(response.body), exp)
if __name__ == '__main__':
main()