import json


def get_fixture(file: str, ext: str = 'json'):
    """Load a fixtures file."""
    file_name = F"tests/fixtures/{file}.{ext}"
    with open(file_name, encoding="utf-8") as open_file:
        if ext == 'json':
            return json.load(open_file)
        return open_file.read()