# Path: tests/support/factories/core_files.py
# TEST_FILE_RESPONSES = {}
# 
# Path: tests/support/constants.py
# BAD_DATAJSON_URL = "http://104.131.35.253/data.json"
# 
# BAD_DATAJSON_URL2 = "http://181.209.63.71/data.json"
# 
# Path: tests/support/utils.py
# def jsonschema_str(string):
#     return repr(string)
# 
# Path: tests/context.py

# 
# Path: tests/support/decorators.py
# RESULTS_DIR = os.path.join("tests", "results")


import json
import os.path
import re
import requests_mock
import vcr
    import mock
import io
from nose.tools import assert_true, assert_false, assert_dict_equal, \
    assert_regexp_matches
from six import iteritems, text_type
from tests.support.factories.core_files import TEST_FILE_RESPONSES
from .support.constants import BAD_DATAJSON_URL, BAD_DATAJSON_URL2
from .support.utils import jsonschema_str
    from unittest import mock
from .context import pydatajson
from .support.decorators import RESULTS_DIR

        sample_path = os.path.join(self.SAMPLES_DIR, case_filename + ".json")
        result_path = os.path.join(self.RESULTS_DIR, case_filename + ".json")

        if expected_dict is None:
            with io.open(result_path, encoding='utf8') as result_file:
                expected_dict = json.load(result_file)

        response_bool = self.dj.is_valid_catalog(sample_path)
        response_dict = self.dj.validate_catalog(sample_path)

        print(text_type(json.dumps(
            response_dict, indent=4, separators=(",", ": "),
            ensure_ascii=False
        )))

        if expected_dict["status"] == "OK":
            assert_true(response_bool)
        elif expected_dict["status"] == "ERROR":
            assert_false(response_bool)
        else:
            raise Exception("LA RESPUESTA {} TIENE UN status INVALIDO".format(
                case_filename))
        assert_dict_equal.__self__.maxDiff = None
        assert_dict_equal(expected_dict, response_dict)

    # Tests de CAMPOS REQUERIDOS

    # Tests de inputs válidos
    def test_validity(self):

# Path: tests/support/factories/core_files.py
# TEST_FILE_RESPONSES = {}
# 
# Path: tests/support/constants.py
# BAD_DATAJSON_URL = "http://104.131.35.253/data.json"
# 
# BAD_DATAJSON_URL2 = "http://181.209.63.71/data.json"
# 
# Path: tests/support/utils.py
# def jsonschema_str(string):
#     return repr(string)
# 
# Path: tests/context.py

# 
# Path: tests/support/decorators.py
# RESULTS_DIR = os.path.join("tests", "results")


# Path: tests/test_validation.py
import json
import os.path
import re
import requests_mock
import vcr
    import mock
import io
from nose.tools import assert_true, assert_false, assert_dict_equal, \
    assert_regexp_matches
from six import iteritems, text_type
from tests.support.factories.core_files import TEST_FILE_RESPONSES
from .support.constants import BAD_DATAJSON_URL, BAD_DATAJSON_URL2
from .support.utils import jsonschema_str
    from unittest import mock
from .context import pydatajson
from .support.decorators import RESULTS_DIR


        sample_path = os.path.join(self.SAMPLES_DIR, case_filename + ".json")
        result_path = os.path.join(self.RESULTS_DIR, case_filename + ".json")

        if expected_dict is None:
            with io.open(result_path, encoding='utf8') as result_file:
                expected_dict = json.load(result_file)

        response_bool = self.dj.is_valid_catalog(sample_path)
        response_dict = self.dj.validate_catalog(sample_path)

        print(text_type(json.dumps(
            response_dict, indent=4, separators=(",", ": "),
            ensure_ascii=False
        )))

        if expected_dict["status"] == "OK":
            assert_true(response_bool)
        elif expected_dict["status"] == "ERROR":
            assert_false(response_bool)
        else:
            raise Exception("LA RESPUESTA {} TIENE UN status INVALIDO".format(
                case_filename))
        assert_dict_equal.__self__.maxDiff = None
        assert_dict_equal(expected_dict, response_dict)

    # Tests de CAMPOS REQUERIDOS

    # Tests de inputs válidos
    def test_validity(self):

        for filename, value_or_none in iteritems(TEST_FILE_RESPONSES):