def METHOD_NAME(self, mock_meta_req):
    """Test get_value_for_attribute returns correctly.
    Setup:
        * Mock out a httplib.HTTPResponse .
        * Return that from _issue_http_request.
    Expected results:
        * A matching string.
    """
    mock_response = 'expected_response'
    with mock.patch(
            'http.client.HTTPResponse',
            mock.mock_open(read_data=mock_response)) as mock_http_resp:
        mock_http_resp.return_value.status = http.client.OK
        mock_meta_req.side_effect = mock_http_resp
        actual_response = metadata_server.get_value_for_attribute('')
    self.assertEqual(actual_response, mock_response)