summaryrefslogtreecommitdiffstats
path: root/result_collection_api/tests/unit/test_version.py
blob: a58cd5629016314cadf066148a789a722c9eb3f9 (plain)
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
import json
import unittest

from test_base import TestBase

__author__ = 'serena'


class TestVersionbBase(TestBase):
    def setUp(self):
        super(TestVersionbBase, self).setUp()
        self.list_res = None
        self.basePath = '/versions'


class TestVersion(TestVersionbBase):
    def test_success(self):
        code, body = self.get()
        self.assertEqual(200, code)
        json_body = json.loads(body)
        self.assertEqual(len(json_body), 1)
        self.assertEqual('basics', json_body[0].get('v1'))

if __name__ == '__main__':
    unittest.main()