Merge "Add unit-test for apiversions.APIVersion.is_latest"

This commit is contained in:
Zuul 2018-03-21 19:54:44 +00:00 committed by Gerrit Code Review
commit 27f1171f54

View File

@ -135,6 +135,12 @@ class APIVersionTestCase(utils.TestCase):
(version_major, version_minor)))
self.assertEqual(repr(api_version), "<APIVersion: %s>" % 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):