code: def test_SentinelAPI_connection(api, small_query):
      api.query(**small_query)
      assert api._last_query == (
          'beginPosition:["2015-01-01T00:00:00Z" TO "2015-01-02T00:00:00Z"] '
          'footprint:"Intersects(POLYGON((0 0,1 1,0 1,0 0)))"'
      )
      assert api._last_response.status_code == 200
  
imports: from contextlib import contextmanager
  from datetime import datetime, date, timedelta
  import pytest
  import requests_mock
  from requests.exceptions import StreamConsumedError, ContentDecodingError, InvalidProxyURL, InvalidHeader, TooManyRedirects, ReadTimeout, SSLError
  from sentinelsat import format_query_date, SentinelAPI
  from sentinelsat.exceptions import QuerySyntaxError, QueryLengthError, UnauthorizedError
  from sentinelsat.sentinel import _format_order_by
label_desc: Use image node_id 2 for calling a global function with example usage: test_SentinelAPI_connection(api, small_query) without return types