"""Dummies for testing.""" query_json = {'id': 4, 'url': 'super-mild.com'} look_json = {'id': 1, 'title': 'first', 'folder_id': 20, 'space_id': 20, 'query_id': 35} list_of_looks = [ look_json, {'id': 2, 'title': 'second'} ] dashboard_filter = {'id': 27, 'dashboard_id': 7, 'title': 'blade'} list_of_dashboard_filters = [ dashboard_filter, {'id': 34, 'dashboard_id': 7, 'title': 'strict'} ] dashboard_element = { 'id': 64, 'query_id': 4, 'look_id': None, 'title': 'sales', 'dashboard_id': 7 } list_of_dashboard_elements = [ dashboard_element, {'id': 65, 'dashboard_id': 7, 'query_id': 5, 'title': 'revenue'} ] dashboard_layout = { 'id': 96, 'dashboard_id': 7, 'dashboard_title': 'awesome', 'dashboard_layout_components': [] } dashboard_layout_component = { 'id': 420, 'dashboard_layout_id': 96, 'dashboard_element_id': 64, 'row': 4, 'column': 2, 'width': 20, 'height': 15 } list_of_layout_components = [ dashboard_layout_component, {'id': 421, 'dashboard_layout_id': 96, 'dashboard_element_id': 64, 'row': 13, 'column': 7, 'width': 14, 'height': 22} ] list_of_dashboard_layouts = [ dashboard_layout, {'id': 97, 'dashboard_id': 7, 'dashboard_title': 'awesome', 'dashboard_layout_components': [dashboard_layout_component]} ] dashboard_json = { 'id': 7, 'title': 'awesome', 'folder_id': 11, 'space_id': 11, 'user_id': 11, 'dashboard_elements': list_of_dashboard_elements, 'dashboard_filters': list_of_dashboard_filters, 'dashboard_layouts': list_of_dashboard_layouts} list_of_dashboards = [dashboard_json, {'id': 37, 'title': 'flash'}] model_explore_joins = [ {'name': 'johny', 'from': 'artificial_light'}, {'name': 'listed_things', 'from': None} ] model_explore = { 'id': 55, 'name': 'digital', 'model_name': 'manson', 'joins': model_explore_joins } model_json = { 'name': 'manson', 'allowed_db_connections': 'fixed', 'explores': [model_explore] } model_input = { 'name': 'core_metadata', 'new_access_filter': 'access_filter: { \n field: orch_app_ar_vendor.vendor_id\n user_attribute: label_id \n }', 'remove_access_filter_join': 'dt_access_filter_1091', 'connection': 'looker_high_performance' } model_lkml_origin = """label: "Core Models" connection: "snowflake_via_lookerappadmin" include: "*.view.lkml" explore: orch_app_ar_owner { label: "Metadata" view_label: "Owner" case_sensitive: no join: label_genre { from: orch_app_ar_genre view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.genre} = ${label_genre.genre_id} ;; type: left_outer } join: dt_access_filter_1091 { sql_on: ${orch_app_ar_vendor.vendor_id} = ${dt_access_filter_1091.vendor_id} ;; type: inner relationship: many_to_one } access_filter: { field: dt_access_filter_1091.is_1091 user_attribute: is_1091 } join: label_country { from: orch_app_ar_country view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.country} = ${label_country.id} ;; fields: [name, continent] } """ model_lkml_no_join = """label: "Core Models" connection: "snowflake_via_lookerappadmin" include: "*.view.lkml" explore: orch_app_ar_owner { label: "Metadata" view_label: "Owner" case_sensitive: no join: label_genre { from: orch_app_ar_genre view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.genre} = ${label_genre.genre_id} ;; type: left_outer } access_filter: { field: dt_access_filter_1091.is_1091 user_attribute: is_1091 } join: label_country { from: orch_app_ar_country view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.country} = ${label_country.id} ;; fields: [name, continent] } """ model_lkml_new_filter = """label: "Core Models" connection: "snowflake_via_lookerappadmin" include: "*.view.lkml" explore: orch_app_ar_owner { label: "Metadata" view_label: "Owner" case_sensitive: no join: label_genre { from: orch_app_ar_genre view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.genre} = ${label_genre.genre_id} ;; type: left_outer } join: dt_access_filter_1091 { sql_on: ${orch_app_ar_vendor.vendor_id} = ${dt_access_filter_1091.vendor_id} ;; type: inner relationship: many_to_one } access_filter: { field: orch_app_ar_vendor.vendor_id user_attribute: label_id } join: label_country { from: orch_app_ar_country view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.country} = ${label_country.id} ;; fields: [name, continent] } """ model_lkml_edited = """label: "Core Models" connection: "looker_high_performance" include: "*.view.lkml" explore: orch_app_ar_owner { label: "Metadata" view_label: "Owner" case_sensitive: no join: label_genre { from: orch_app_ar_genre view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.genre} = ${label_genre.genre_id} ;; type: left_outer } access_filter: { field: orch_app_ar_vendor.vendor_id user_attribute: label_id } join: label_country { from: orch_app_ar_country view_label: "Label" relationship: many_to_one sql_on: ${orch_app_ar_vendor.country} = ${label_country.id} ;; fields: [name, continent] } """ view_names = {'i_know.view.lkml', 'the_pieces.view.lkml, fit.view.lkml'}