Correct testcase content

There were two test cases in test_http.py, where the input data was the
exact same into the two cases, which means that there is an uncovered
case for the url formats currently. The test cases are renamed properly.

Change-Id: I224035e0959116668494a8b64af34eabeea1c251
This commit is contained in:
Ildiko Vancsa
2014-04-04 17:57:03 +02:00
parent defbb95855
commit d7bc41a85d

View File

@@ -22,22 +22,22 @@ from ceilometerclient.tests import utils
class HttpClientTest(utils.BaseTestCase):
url = 'http://localhost'
def test_url_generation_trailing_slash_in_base(self):
def test_url_generation_trailing_slash_in_base_prefix_in_path(self):
client = http.HTTPClient("%s/" % self.url)
url = client._make_connection_url('/v1/resources')
self.assertEqual(url, '/v1/resources')
def test_url_generation_without_trailing_slash_in_base(self):
def test_url_generation_no_trailing_slash_in_base_prefix_in_path(self):
client = http.HTTPClient(self.url)
url = client._make_connection_url('/v1/resources')
self.assertEqual(url, '/v1/resources')
def test_url_generation_prefix_slash_in_path(self):
def test_url_generation_trailing_slash_in_base_no_prefix_in_path(self):
client = http.HTTPClient("%s/" % self.url)
url = client._make_connection_url('/v1/resources')
url = client._make_connection_url('v1/resources')
self.assertEqual(url, '/v1/resources')
def test_url_generation_without_prefix_slash_in_path(self):
def test_url_generation_no_trailing_slash_in_base_no_prefix_in_path(self):
client = http.HTTPClient(self.url)
url = client._make_connection_url('v1/resources')
self.assertEqual(url, '/v1/resources')