Exemplo n.º 1
0
def compare_projects_files(orig_file, new_file):
    with open(orig_file) as orig:
        orig_json = json.load(orig)
        with open(new_file) as exported:
            exported_json = json.load(exported)
            test = TestCase()
            test.maxDiff = None
            test.assertDictEqual(orig_json, exported_json)
Exemplo n.º 2
0
def compare_models(models_json, format_=None):
    # The Prosoul database must only contains the models imported
    exported_models_json = fetch_models()
    if format_ == 'ossmeter':
        exported_models_json = gl2ossmeter(exported_models_json)
    elif format_ == 'alambic':
        exported_models_json = gl2alambic(exported_models_json)
    test = TestCase()
    test.maxDiff = None
    test.assertDictEqual(models_json, exported_models_json)
    logging.info("Check completed")