Change url in middleware test to v3

This changes the url for checking normalized URLS with middleware from
v2.0 urls to v3.

Change-Id: Ic78d7842d7b3c36c2eb9cd74a3bd04b837af77c0
This commit is contained in:
Gage Hugo 2017-10-19 15:12:34 -05:00
parent e9f2b69c22
commit aaccc5bd58
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."""