import json


def mocked_requests_get(*args, **kwargs):
    """
    Mocked requests.get
    :return: MockResponse
    """

    class MockResponse:
        """
        Class mocking the response of calling request.get in the python-forecastio library
        """

        def __init__(self, json_data, status_code):
            self.json_data = json_data
            self.status_code = status_code
            self.headers = None

        def raise_for_status(self):
            """
            This method is used to check for errors, but none will (should) exist in a mocked response
            """
            pass

        def json(self):
            """
            :return: dict
            """
            return self.json_data

    with open(args[0], 'r', encoding='utf-8') as file_stream:
        return MockResponse(json.load(file_stream), 200)