From e20171bf66358c3e1ae6a5873059d026bf892df1 Mon Sep 17 00:00:00 2001 From: Alexander Pugachev Date: Wed, 24 Jan 2018 09:47:18 +0000 Subject: [PATCH] Add unit-test for apiversions.APIVersion.is_latest The method was not covered. Change-Id: I2376a2e948445ca532f3126cc5570bab2544e7b4 Partial-Bug: #1364800 --- manilaclient/tests/unit/test_api_versions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manilaclient/tests/unit/test_api_versions.py b/manilaclient/tests/unit/test_api_versions.py index 4ba337fd7..a16146036 100644 --- a/manilaclient/tests/unit/test_api_versions.py +++ b/manilaclient/tests/unit/test_api_versions.py @@ -133,6 +133,12 @@ class APIVersionTestCase(utils.TestCase): (version_major, version_minor))) self.assertEqual(repr(api_version), "" % version) + def test_is_latest(self): + v1 = api_versions.APIVersion("1.0") + self.assertFalse(v1.is_latest()) + v_latest = api_versions.APIVersion(api_versions.MAX_VERSION) + self.assertTrue(v_latest.is_latest()) + class GetAPIVersionTestCase(utils.TestCase):