1 ##############################################################################
2 # Copyright (c) 2016 ZTE Corporation
3 # feng.xiaowei@zte.com.cn
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from test_base import TestBase
12 from opnfv_testapi.resources.models import Versions
15 class TestVersionBase(TestBase):
17 super(TestVersionBase, self).setUp()
18 self.list_res = Versions
19 self.basePath = '/versions'
22 class TestVersion(TestVersionBase):
23 def test_success(self):
24 code, body = self.get()
25 self.assertEqual(200, code)
26 self.assertEqual(len(body.versions), 1)
27 self.assertEqual(body.versions[0].version, 'v1.0')
28 self.assertEqual(body.versions[0].description, 'basics')
30 if __name__ == '__main__':