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'))
def test_no_version_path_solidus(self): self.assertEqual( 'http://localhost/identity/v2.0', auth.replace_version('http://localhost/identity/', 'v2.0'))
def test_path_version(self): self.assertEqual( 'http://localhost/identity/v2.0', auth.replace_version('http://localhost/identity/v3', 'v2.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'))
def test_no_version_base_solidus(self): self.assertEqual( 'http://localhost:35357/v2.0', auth.replace_version('http://localhost:35357/', 'v2.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'))