Merge "Change url in middleware test to v3"

This commit is contained in:
Zuul 2017-11-04 10:51:42 +00:00 committed by Gerrit Code Review
commit cadb94e457
1 changed files with 4 additions and 4 deletions

View File

@ -39,13 +39,13 @@ class UrlMiddlewareTest(unit.TestCase):
self.response_headers = dict(headers)
def test_trailing_slash_normalization(self):
"""Test /v2.0/tokens and /v2.0/tokens/ normalized URLs match."""
req1 = webob.Request.blank('/v2.0/tokens')
req2 = webob.Request.blank('/v2.0/tokens/')
"""Test /v3/auth/tokens & /v3/auth/tokens/ normalized URLs match."""
req1 = webob.Request.blank('/v3/auth/tokens')
req2 = webob.Request.blank('/v3/auth/tokens/')
self.middleware(req1.environ, self.start_fake_response)
self.middleware(req2.environ, self.start_fake_response)
self.assertEqual(req1.path_url, req2.path_url)
self.assertEqual('http://localhost/v2.0/tokens', req1.path_url)
self.assertEqual('http://localhost/v3/auth/tokens', req1.path_url)
def test_rewrite_empty_path(self):
"""Test empty path is rewritten to root."""