def test_process_explores(config): grapher = LookMlGrapher(config) lookml = LookML("test/grapher_lkml/some_model.model.lkml") m = lookml.base_name e = lookml.json_data['explores'][0] assert grapher.models_to_explores == [] assert grapher.explores_to_views == [] grapher.process_explores(m, e) assert grapher.models_to_explores == [('some_model', 'some_explore')] assert grapher.explores_to_views == [('some_explore', 'some_view'), ('some_explore', 'some_other_view')]
def test_process_explores(config): grapher = LookMlGrapher(config) lookml = LookML("test/grapher_lkml/some_model.model.lkml") m = lookml.base_name e = lookml.json_data["explores"][0] assert grapher.models_to_explores == [] assert grapher.explores_to_views == [] grapher.process_explores(m, e) assert grapher.models_to_explores == [("some_model", "some_explore")] assert grapher.explores_to_views == [ ("some_explore", "some_view"), ("some_explore", "some_other_view"), ]
def test_process_explores(config): grapher = LookMlGrapher(config) json_data = grapher.lookml.get_json_representation( "test/grapher_lkml/some_model.model.lkml") m = json_data['files'][0]['models'][0] e = m['explores'][0] assert grapher.models_to_explores == [] assert grapher.explores_to_views == [] grapher.process_explores(m, e) assert grapher.models_to_explores == [('some_model', 'some_explore')] assert grapher.explores_to_views == [('some_explore', 'some_view'), ('some_explore', 'some_other_view')] if os.path.exists(config['tmp_file']): os.remove(config['tmp_file'])