diff options
Diffstat (limited to 'result_collection_api/opnfv_testapi/tests/unit/test_version.py')
-rw-r--r-- | result_collection_api/opnfv_testapi/tests/unit/test_version.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/result_collection_api/opnfv_testapi/tests/unit/test_version.py b/result_collection_api/opnfv_testapi/tests/unit/test_version.py new file mode 100644 index 0000000..626b290 --- /dev/null +++ b/result_collection_api/opnfv_testapi/tests/unit/test_version.py @@ -0,0 +1,25 @@ +import unittest + +from test_base import TestBase +from opnfv_testapi.resources.models import Versions + +__author__ = 'serena' + + +class TestVersionbBase(TestBase): + def setUp(self): + super(TestVersionbBase, self).setUp() + self.list_res = Versions + self.basePath = '/versions' + + +class TestVersion(TestVersionbBase): + def test_success(self): + code, body = self.get() + self.assertEqual(200, code) + self.assertEqual(len(body.versions), 1) + self.assertEqual(body.versions[0].version, 'v1.0') + self.assertEqual(body.versions[0].description, 'basics') + +if __name__ == '__main__': + unittest.main() |