def _check_session_mocks(self, client, fake_session_factory, expected_url, headers=None):
    fake_session_factory.assert_called_once_with(client._credentials)
    fake_transport = fake_session_factory.return_value
    self.assertEqual(fake_transport.request.call_count, 2)
    if (headers is None):
        headers = {}
    headers['range'] = 'bytes=3-5'
    call = mock.call('GET', expected_url, data=None, headers=headers)
    self.assertEqual(fake_transport.request.mock_calls, [call, call])
def _check_session_mocks(self, client, fake_session_factory, expected_url, headers=None):
    fake_session_factory.assert_called_once_with(client._credentials)
    fake_transport = fake_session_factory.return_value
    self.assertEqual(fake_transport.request.call_count, 2)
    if (headers is None):
        headers = {}
    headers['range'] = 'bytes=3-5'
    call = mock.call('GET', expected_url, data=None, headers=headers)
    self.assertEqual(fake_transport.request.mock_calls, [call, call])