a58cd5629016314cadf066148a789a722c9eb3f9
[releng.git] / utils / test / result_collection_api / tests / unit / test_version.py
1 import json
2 import unittest
3
4 from test_base import TestBase
5
6 __author__ = 'serena'
7
8
9 class TestVersionbBase(TestBase):
10     def setUp(self):
11         super(TestVersionbBase, self).setUp()
12         self.list_res = None
13         self.basePath = '/versions'
14
15
16 class TestVersion(TestVersionbBase):
17     def test_success(self):
18         code, body = self.get()
19         self.assertEqual(200, code)
20         json_body = json.loads(body)
21         self.assertEqual(len(json_body), 1)
22         self.assertEqual('basics', json_body[0].get('v1'))
23
24 if __name__ == '__main__':
25     unittest.main()