#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import json
import responses
from six.moves.urllib.parse import urljoin
from dateutil import parser
from datarobot.models.full_api.generated.model.pps_image_metadata_response import PPSImageMetadataResponse
from datarobot.utils import from_api
from datarobot.models.full_api.generated.model import *

from datarobot.models.full_api.generated.api.mlops_api import MlopsApi




@responses.activate
def test_mlops_api_mlops_portable_prediction_server_image_list(unittest_endpoint):
    responses.add(
        responses.GET,
       '{endpoint}/api/v2/mlops/portablePredictionServerImage/'.format(endpoint=unittest_endpoint),
        status=200,
        content_type='',
    )
    result = MlopsApi.mlops_portable_prediction_server_image_list()
    assert isinstance(result, type(None))


@responses.activate
def test_mlops_api_mlops_portable_prediction_server_image_metadata_list(unittest_endpoint):
    responses.add(
        responses.GET,
       '{endpoint}/api/v2/mlops/portablePredictionServerImage/metadata/'.format(endpoint=unittest_endpoint),
        status=200,
        content_type='application/json',
        body=json.dumps({
  "shortDockerImageId" : "shortDockerImageId",
  "filename" : "filename",
  "baseImageId" : "baseImageId",
  "created" : "2000-01-23T04:56:07.000+00:00",
  "datarobotRuntimeImageTag" : "datarobotRuntimeImageTag",
  "dockerImageId" : "dockerImageId",
  "imageSize" : 0,
  "hash" : "hash",
  "hashAlgorithm" : "SHA256"
})
    )
    result = MlopsApi.mlops_portable_prediction_server_image_metadata_list()
    assert isinstance(result, PPSImageMetadataResponse)
