# Path: model_card_toolkit/utils/json_util.py
# def update(json_dict: Optional[Dict[Text, Any]] = None) -> Dict[Text, Any]:
# def _update_from_v1_to_v2(json_dict: Dict[Text, Any]) -> Dict[Text, Any]:


import json
import os
import pkgutil
import jsonschema
from absl.testing import absltest
from model_card_toolkit.utils import json_util
"""Tests for model_card_toolkit.utils.json_util."""


_CATS_VS_DOGS_V1_PATH = os.path.join("utils", "testdata", "cats_vs_dogs.json")
_CATS_VS_DOGS_V1_TEXT = pkgutil.get_data("model_card_toolkit",
                                         _CATS_VS_DOGS_V1_PATH)
_CATS_VS_DOGS_V1_DICT = json.loads(_CATS_VS_DOGS_V1_TEXT)

_CATS_VS_DOGS_V2_PATH = os.path.join("template", "test", "cats_vs_dogs.json")
_CATS_VS_DOGS_V2_TEXT = pkgutil.get_data("model_card_toolkit",
                                         _CATS_VS_DOGS_V2_PATH)
_CATS_VS_DOGS_V2_DICT = json.loads(_CATS_VS_DOGS_V2_TEXT)

_MODEL_CARD_SECTIONS = ("model_details", "model_parameters", "considerations")
_QUANTITATIVE_ANALYSIS = "quantitative_analysis"
_CONFIDENCE_INTERVAL = "confidence_interval"


class JsonUtilTest(absltest.TestCase):

  def test_json_update_succeeds(self):


# Path: model_card_toolkit/utils/json_util.py
# def update(json_dict: Optional[Dict[Text, Any]] = None) -> Dict[Text, Any]:
# def _update_from_v1_to_v2(json_dict: Dict[Text, Any]) -> Dict[Text, Any]:


# Path: model_card_toolkit/utils/json_util_test.py
import json
import os
import pkgutil
import jsonschema
from absl.testing import absltest
from model_card_toolkit.utils import json_util

"""Tests for model_card_toolkit.utils.json_util."""


_CATS_VS_DOGS_V1_PATH = os.path.join("utils", "testdata", "cats_vs_dogs.json")
_CATS_VS_DOGS_V1_TEXT = pkgutil.get_data("model_card_toolkit",
                                         _CATS_VS_DOGS_V1_PATH)
_CATS_VS_DOGS_V1_DICT = json.loads(_CATS_VS_DOGS_V1_TEXT)

_CATS_VS_DOGS_V2_PATH = os.path.join("template", "test", "cats_vs_dogs.json")
_CATS_VS_DOGS_V2_TEXT = pkgutil.get_data("model_card_toolkit",
                                         _CATS_VS_DOGS_V2_PATH)
_CATS_VS_DOGS_V2_DICT = json.loads(_CATS_VS_DOGS_V2_TEXT)

_MODEL_CARD_SECTIONS = ("model_details", "model_parameters", "considerations")
_QUANTITATIVE_ANALYSIS = "quantitative_analysis"
_CONFIDENCE_INTERVAL = "confidence_interval"


class JsonUtilTest(absltest.TestCase):

  def test_json_update_succeeds(self):


    updated_cats_vs_dogs_dict = json_util.update(