Merge "Add test_valid_api_version in the test_constraints"

This commit is contained in:
Jenkins 2016-09-06 18:50:55 +00:00 committed by Gerrit Code Review
commit 069dd4e708

View File

@ -464,6 +464,16 @@ class TestConstraints(unittest.TestCase):
self.fail('check_container_format did not raise error for %r' %
req.headers['X-Versions-Location'])
def test_valid_api_version(self):
version = 'v1'
self.assertTrue(constraints.valid_api_version(version))
version = 'v1.0'
self.assertTrue(constraints.valid_api_version(version))
version = 'v2'
self.assertFalse(constraints.valid_api_version(version))
class TestConstraintsConfig(unittest.TestCase):