@@ -61,6 +61,13 @@ def base_run_1_6(self):
6161 def target_run_1_6 (self ):
6262 return self .run_object ("jaffle_shop_target_1_6.json" )
6363
64+ def base_run_1_7 (self ):
65+ return self .run_object ("jaffle_shop_base_1_7.json" )
66+
67+ def target_run_1_7 (self ):
68+ return self .run_object ("jaffle_shop_target_1_7.json" )
69+
70+
6471 def base_31587 (self ):
6572 return self .run_object ("sc-31587-base.json" )
6673
@@ -187,6 +194,60 @@ def test_list_all_resources_16(self):
187194
188195 self .assertDbtResources (expected , all_results )
189196
197+ @pytest .mark .skipif (dbt_version < 'v1.7' , reason = 'skip manifest test before dbt-core 1.7' )
198+ def test_list_all_resources_17 (self ):
199+ expected = [
200+ "metric.jaffle_shop.average_order_amount" ,
201+ "metric.jaffle_shop.expenses" ,
202+ "metric.jaffle_shop.profit" ,
203+ "metric.jaffle_shop.revenue" ,
204+ "model.jaffle_shop.int_customer_order_history_joined" ,
205+ "model.jaffle_shop.int_order_payments_pivoted" ,
206+ "model.jaffle_shop.metricflow_time_spine" ,
207+ "model.jaffle_shop.orders" ,
208+ "model.jaffle_shop.stg_customers" ,
209+ "model.jaffle_shop.stg_orders" ,
210+ "model.jaffle_shop.stg_payments" ,
211+ "seed.jaffle_shop.raw_customers" ,
212+ "seed.jaffle_shop.raw_orders" ,
213+ "seed.jaffle_shop.raw_payments" ,
214+ "semantic_model.jaffle_shop.orders" ,
215+ "test.jaffle_shop.accepted_values_int_order_payments_pivoted_status__placed__shipped__completed__return_pending__returned.0ccdff53e8" ,
216+ "test.jaffle_shop.accepted_values_orders_status__placed__shipped__completed__return_pending__returned.be6b5b5ec3" ,
217+ "test.jaffle_shop.accepted_values_stg_orders_status__placed__shipped__completed__return_pending__returned.080fb20aad" ,
218+ "test.jaffle_shop.accepted_values_stg_payments_payment_method__credit_card__coupon__bank_transfer__gift_card.3c3820f278" ,
219+ "test.jaffle_shop.not_null_int_customer_order_history_joined_customer_id.5eeb8cdf92" ,
220+ "test.jaffle_shop.not_null_int_order_payments_pivoted_amount.b7598e0e3b" ,
221+ "test.jaffle_shop.not_null_int_order_payments_pivoted_bank_transfer_amount.1a9e62933b" ,
222+ "test.jaffle_shop.not_null_int_order_payments_pivoted_coupon_amount.2532b538c2" ,
223+ "test.jaffle_shop.not_null_int_order_payments_pivoted_credit_card_amount.ae9c42d967" ,
224+ "test.jaffle_shop.not_null_int_order_payments_pivoted_customer_id.3db59c6de4" ,
225+ "test.jaffle_shop.not_null_int_order_payments_pivoted_gift_card_amount.710d789cc0" ,
226+ "test.jaffle_shop.not_null_int_order_payments_pivoted_order_id.787ba994a8" ,
227+ "test.jaffle_shop.not_null_orders_amount.106140f9fd" ,
228+ "test.jaffle_shop.not_null_orders_bank_transfer_amount.7743500c49" ,
229+ "test.jaffle_shop.not_null_orders_coupon_amount.ab90c90625" ,
230+ "test.jaffle_shop.not_null_orders_credit_card_amount.d3ca593b59" ,
231+ "test.jaffle_shop.not_null_orders_customer_id.c5f02694af" ,
232+ "test.jaffle_shop.not_null_orders_gift_card_amount.413a0d2d7a" ,
233+ "test.jaffle_shop.not_null_orders_order_id.cf6c17daed" ,
234+ "test.jaffle_shop.not_null_stg_customers_customer_id.e2cfb1f9aa" ,
235+ "test.jaffle_shop.not_null_stg_orders_order_id.81cfe2fe64" ,
236+ "test.jaffle_shop.not_null_stg_payments_payment_id.c19cc50075" ,
237+ "test.jaffle_shop.relationships_int_order_payments_pivoted_customer_id__customer_id__ref_int_customer_order_history_joined_.654a1aa35d" ,
238+ "test.jaffle_shop.unique_int_customer_order_history_joined_customer_id.995635f7d9" ,
239+ "test.jaffle_shop.unique_int_order_payments_pivoted_order_id.34a0f3307d" ,
240+ "test.jaffle_shop.unique_orders_order_id.fed79b3a6e" ,
241+ "test.jaffle_shop.unique_stg_customers_customer_id.c7614daada" ,
242+ "test.jaffle_shop.unique_stg_orders_order_id.e3b841c71a" ,
243+ "test.jaffle_shop.unique_stg_payments_payment_id.3744510712"
244+ ]
245+
246+ manifest = load_manifest (_load_manifest ('dbt-duckdb-1.7.0-manifest.json' ))
247+ all_results = list_resources_unique_id_from_manifest (manifest )
248+
249+ self .assertDbtResources (expected , all_results )
250+
190251 def test_compare_with_manifests (self ):
191252 without_downstream = compare_models_between_manifests (
192253 self .base_manifest (), self .target_manifest ()
@@ -209,9 +270,15 @@ def test_list_explicit_changes(self):
209270 expected = ["model.jaffle_shop.customers" , "model.jaffle_shop.orders" ]
210271 changes = c .list_explicit_changes ()
211272 self .assertDbtResources (changes , expected )
212- else :
273+ elif dbt_version < '1.7' :
213274 c = GraphDataChangeSet (self .base_run_1_6 (), self .target_run_1_6 ())
214275
276+ expected = ["model.jaffle_shop.orders" ]
277+ changes = c .list_explicit_changes ()
278+ self .assertDbtResources (changes , expected )
279+ elif dbt_version < '1.8' :
280+ c = GraphDataChangeSet (self .base_run_1_7 (), self .target_run_1_7 ())
281+
215282 expected = ["model.jaffle_shop.orders" ]
216283 changes = c .list_explicit_changes ()
217284 self .assertDbtResources (changes , expected )
@@ -266,7 +333,7 @@ def test_list_changes_metrics_case(self):
266333 changes ,
267334 ["metric.jaffle_shop.average_order_amount" , "model.jaffle_shop.orders" ],
268335 )
269- else :
336+ elif dbt_version < '1.7' :
270337 c = GraphDataChangeSet (self .base_run_1_6 (), self .target_run_1_6 ())
271338 expected = ["model.jaffle_shop.orders" ]
272339 changes = c .list_explicit_changes ()
@@ -277,6 +344,12 @@ def test_list_changes_metrics_case(self):
277344 changes ,
278345 ["metric.jaffle_shop.average_order_amount" , "model.jaffle_shop.orders" ],
279346 )
347+ elif dbt_version < '1.8' :
348+ c = GraphDataChangeSet (self .base_run_1_7 (), self .target_run_1_7 ())
349+
350+ expected = ["model.jaffle_shop.orders" ]
351+ changes = c .list_explicit_changes ()
352+ self .assertDbtResources (changes , expected )
280353
281354 @unittest .skipIf (
282355 dbt_version < version .parse ("1.4" ),
0 commit comments