Test 'string' behaviour of get_object

Add a unit test to test the 'string' like behaviour of
get_object when it is called without resp_chunk_size set.

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Change-Id: I496032a76036141d027c30b076c810b34bc6bef0
This commit is contained in:
Stuart McLaren 2015-12-15 16:54:04 +00:00
parent 4d9b1e760d
commit 0103465fcb

@ -769,6 +769,12 @@ class TestGetObject(MockHttpTest):
'x-auth-token': 'asdf'}),
])
def test_get_object_as_string(self):
c.http_connection = self.fake_http_connection(200, body='abcde')
__, resp = c.get_object('http://storage.example.com', 'TOKEN',
'container_name', 'object_name')
self.assertEqual(resp, 'abcde')
def test_request_headers(self):
c.http_connection = self.fake_http_connection(200)
conn = c.http_connection('http://www.test.com')