code: def test_get_product_odata_scihub_down(read_fixture_file):
      api = SentinelAPI("mock_user", "mock_password")
  
      request_url = "https://apihub.copernicus.eu/apihub/odata/v1/Products('8df46c9e-a20c-43db-a19a-4240c2ed3b8b')?$format=json"
  
      with requests_mock.mock() as rqst:
          rqst.get(
              request_url, text="Mock SciHub is Down", status_code=503
          )
          with pytest.raises(ServerError) as excinfo:
              api.get_product_odata(
                  "8df46c9e-a20c-43db-a19a-4240c2ed3b8b"
              )
          assert (
              str(excinfo.value)
              == "HTTP status 503: Mock SciHub is Down"
          )
  
          rqst.get(
              request_url,
              text='{"error":{"code":null,"message":{"lang":"en","value":'
              "\"No Products found with key '8df46c9e-a20c-43db-a19a-4240c2ed3b8b' \"}}}",
              status_code=500,
          )
          with pytest.raises(ServerError) as excinfo:
              api.get_product_odata(
                  "8df46c9e-a20c-43db-a19a-4240c2ed3b8b"
              )
          assert (
              str(excinfo.value)
              == "HTTP status 500: No Products found with key '8df46c9e-a20c-43db-a19a-4240c2ed3b8b' "
          )
  
          rqst.get(
              request_url, text="Mock SciHub is Down", status_code=200
          )
          with pytest.raises(ServerError) as excinfo:
              api.get_product_odata(
                  "8df46c9e-a20c-43db-a19a-4240c2ed3b8b"
              )
          assert (
              str(excinfo.value)
              == "HTTP status 200: Mock SciHub is Down"
          )
  
          # Test with a real "server under maintenance" response
          rqst.get(
              request_url,
              text=read_fixture_file("server_maintenance.html"),
              status_code=502,
          )
          with pytest.raises(ServerError) as excinfo:
              api.get_product_odata(
                  "8df46c9e-a20c-43db-a19a-4240c2ed3b8b"
              )
          assert (
              "The Sentinels Scientific Data Hub will be back soon!"
              in excinfo.value.msg
          )
  
file_path: sentinelsat/tests/test_odata.py
imports: from datetime import datetime
  import pytest
  import requests_mock
  from sentinelsat import SentinelAPI
  from sentinelsat.exceptions import InvalidKeyError, ServerError
  from sentinelsat.sentinel import _parse_odata_timestamp
  from .conftest import chain, scrub_string
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_product_odata_scihub_down(read_fixture_file) without return types