diff options
Diffstat (limited to 'testapi/opnfv_testapi/tests/unit/test_version.py')
-rw-r--r-- | testapi/opnfv_testapi/tests/unit/test_version.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/testapi/opnfv_testapi/tests/unit/test_version.py b/testapi/opnfv_testapi/tests/unit/test_version.py index 5cd83fd..fff802a 100644 --- a/testapi/opnfv_testapi/tests/unit/test_version.py +++ b/testapi/opnfv_testapi/tests/unit/test_version.py @@ -6,9 +6,11 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import httplib import unittest from opnfv_testapi.resources import models +from opnfv_testapi.tests.unit import executor from opnfv_testapi.tests.unit import test_base as base @@ -20,12 +22,15 @@ class TestVersionBase(base.TestBase): class TestVersion(TestVersionBase): + @executor.get(httplib.OK, '_get_success') def test_success(self): - code, body = self.get() - self.assertEqual(200, code) + return None + + def _get_success(self, body): 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() |