'Check connection re-use after close header is received'

def test_connection_close(self):

    HTTPretty.register_uri(HTTPretty.POST, ('https://%s/' % self.region.endpoint), json.dumps({'test': 'secure'}), content_type='application/json', connection='close')
    conn = self.region.connect(aws_access_key_id='access_key', aws_secret_access_key='secret')
    def mock_put_conn(*args, **kwargs):
        raise Exception('put_http_connection    should    not    be    called!')
    conn.put_http_connection = mock_put_conn
    resp1 = conn.make_request('myCmd1', {'par1': 'foo', 'par2': 'baz'}, '/', 'POST')
    self.assertEqual(resp1.getheader('connection'), 'close')
