# Path: socceraction/data/base.py
# def _localloadjson(path: str) -> JSONType:
#     """Load a dictionary from a JSON's filepath.
# 
#     Parameters
#     ----------
#     path : str
#         JSON's filepath.
# 
#     Returns
#     -------
#     JSONType
#         A dictionary with the data loaded.
#     """
#     with open(path, 'rt', encoding='utf-8') as fh:
#         return json.load(fh)
# 
# def _remoteloadjson(path: str) -> JSONType:
#     """Load JSON data from a URL.
# 
#     Parameters
#     ----------
#     path : str
#         URL of the data source.
# 
#     Returns
#     -------
#     JSONType
#         A dictionary with the loaded JSON data.
#     """
#     return json.loads(urlopen(path).read())


import os
from socceraction.data.base import _localloadjson, _remoteloadjson



def test_load_json_from_url() -> None:
    url = "https://raw.githubusercontent.com/statsbomb/open-data/master/data/events/15946.json"
    result = _remoteloadjson(url)

# Path: socceraction/data/base.py
# def _localloadjson(path: str) -> JSONType:
#     """Load a dictionary from a JSON's filepath.
# 
#     Parameters
#     ----------
#     path : str
#         JSON's filepath.
# 
#     Returns
#     -------
#     JSONType
#         A dictionary with the data loaded.
#     """
#     with open(path, 'rt', encoding='utf-8') as fh:
#         return json.load(fh)
# 
# def _remoteloadjson(path: str) -> JSONType:
#     """Load JSON data from a URL.
# 
#     Parameters
#     ----------
#     path : str
#         URL of the data source.
# 
#     Returns
#     -------
#     JSONType
#         A dictionary with the loaded JSON data.
#     """
#     return json.loads(urlopen(path).read())


# Path: tests/data/test_base.py
import os
from socceraction.data.base import _localloadjson, _remoteloadjson




def test_load_json_from_url() -> None:
    url = "https://raw.githubusercontent.com/statsbomb/open-data/master/data/events/15946.json"
    result = _remoteloadjson(url)

    assert isinstance(result, list)