示例#1
0
 def test_path_version_trailing_path_solidus(self):
     self.assertEqual(
         'http://localhost/identity/v2.0/uuid/',
         auth.replace_version('http://localhost/identity/v3/uuid/', 'v2.0'))
示例#2
0
 def test_no_version_path_solidus(self):
     self.assertEqual(
         'http://localhost/identity/v2.0',
         auth.replace_version('http://localhost/identity/', 'v2.0'))
示例#3
0
 def test_path_version(self):
     self.assertEqual(
         'http://localhost/identity/v2.0',
         auth.replace_version('http://localhost/identity/v3', 'v2.0'))
示例#4
0
 def test_version_trailing_path(self):
     self.assertEqual(
         'http://localhost:35357/v2.0/uuid',
         auth.replace_version('http://localhost:35357/v3/uuid', 'v2.0'))
示例#5
0
 def test_no_version_base_solidus(self):
     self.assertEqual(
         'http://localhost:35357/v2.0',
         auth.replace_version('http://localhost:35357/', 'v2.0'))
示例#6
0
 def test_path_version_trailing_path_solidus(self):
     self.assertEqual(
         'http://localhost/identity/v2.0/uuid/',
         auth.replace_version('http://localhost/identity/v3/uuid/', 'v2.0'))
示例#7
0
 def test_version_no_trailing_path_solidus(self):
     self.assertEqual(
         'http://localhost:35357/v2.0/',
         auth.replace_version('http://localhost:35357/v3/', 'v2.0'))
示例#8
0
 def test_path_version(self):
     self.assertEqual(
         'http://localhost/identity/v2.0',
         auth.replace_version('http://localhost/identity/v3', 'v2.0'))
示例#9
0
 def test_no_version_path_solidus(self):
     self.assertEqual(
         'http://localhost/identity/v2.0',
         auth.replace_version('http://localhost/identity/', 'v2.0'))
示例#10
0
 def test_no_version_base_solidus(self):
     self.assertEqual(
         'http://localhost:35357/v2.0',
         auth.replace_version('http://localhost:35357/', 'v2.0'))
示例#11
0
 def test_version_trailing_path(self):
     self.assertEqual(
         'http://localhost:35357/v2.0/uuid',
         auth.replace_version('http://localhost:35357/v3/uuid', 'v2.0'))
示例#12
0
 def test_version_no_trailing_path_solidus(self):
     self.assertEqual(
         'http://localhost:35357/v2.0/',
         auth.replace_version('http://localhost:35357/v3/', 'v2.0'))