diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.1.json index 5d820ec5bb..ab08681f5b 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.2.json index 910c9e57a1..e1268bba87 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.upcoming.2.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json index a8fb7a8f6d..f503001e12 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json index a8fb7a8f6d..f503001e12 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.create.1.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.create.1.json index ff4507e892..a296ccce06 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.create.1.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.1.json index 7cbd276237..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.2.json index 7cbd276237..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.3.json index 7cbd276237..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.3.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.3.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.4.json index 7cbd276237..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.4.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.4.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.5.json index 7cbd276237..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.5.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Customer.retrieve.5.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Subscription.create.1.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Subscription.create.1.json index f1da4b4096..0b781e6f4d 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Token.create.1.json b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Token.create.1.json index 4964dd83ef..cb80bbb8d2 100644 Binary files a/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Token.create.1.json and b/corporate/tests/stripe_fixtures/billing_quantity_changes_end_to_end:Token.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Customer.create.1.json b/corporate/tests/stripe_fixtures/downgrade:Customer.create.1.json index adf01cdb09..0909309436 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Customer.create.1.json and b/corporate/tests/stripe_fixtures/downgrade:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.1.json index aefc265018..29d08b92dd 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.2.json index c420efec8b..975b957873 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.3.json index 1aaa6a6c7a..c2b5641f12 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.3.json and b/corporate/tests/stripe_fixtures/downgrade:Customer.retrieve.3.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Customer.save.1.json b/corporate/tests/stripe_fixtures/downgrade:Customer.save.1.json index 575dbf8b46..db5505b756 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Customer.save.1.json and b/corporate/tests/stripe_fixtures/downgrade:Customer.save.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/downgrade:Invoice.upcoming.1.json index 43f6211c27..e7be90b9f4 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/downgrade:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Subscription.create.1.json b/corporate/tests/stripe_fixtures/downgrade:Subscription.create.1.json index 66901a8e40..d36cc6db0d 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/downgrade:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Subscription.delete.1.json b/corporate/tests/stripe_fixtures/downgrade:Subscription.delete.1.json index 220c523cdc..f441c0c632 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Subscription.delete.1.json and b/corporate/tests/stripe_fixtures/downgrade:Subscription.delete.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Subscription.retrieve.1.json b/corporate/tests/stripe_fixtures/downgrade:Subscription.retrieve.1.json index 220c523cdc..f441c0c632 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Subscription.retrieve.1.json and b/corporate/tests/stripe_fixtures/downgrade:Subscription.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Subscription.save.1.json b/corporate/tests/stripe_fixtures/downgrade:Subscription.save.1.json index 0f29ab345f..2879aeb08d 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Subscription.save.1.json and b/corporate/tests/stripe_fixtures/downgrade:Subscription.save.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade:Token.create.1.json b/corporate/tests/stripe_fixtures/downgrade:Token.create.1.json index 3fe77a352b..38f99dd374 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade:Token.create.1.json and b/corporate/tests/stripe_fixtures/downgrade:Token.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade_with_money_owed:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/downgrade_with_money_owed:Invoice.upcoming.1.json index e6b6bb164b..9e52d5cf33 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade_with_money_owed:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/downgrade_with_money_owed:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/downgrade_with_money_owed:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/downgrade_with_money_owed:InvoiceItem.create.1.json index a7cc14a574..e64d971114 100644 Binary files a/corporate/tests/stripe_fixtures/downgrade_with_money_owed:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/downgrade_with_money_owed:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.create.1.json b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.create.1.json index 72fb0ff04c..a296ccce06 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.create.1.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.1.json index e8a67d9532..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.2.json index e8a67d9532..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/initial_upgrade:Invoice.upcoming.1.json index b8750311ca..9ce03b7bc2 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Subscription.create.1.json b/corporate/tests/stripe_fixtures/initial_upgrade:Subscription.create.1.json index 9c98765439..0b781e6f4d 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/initial_upgrade:Token.create.1.json b/corporate/tests/stripe_fixtures/initial_upgrade:Token.create.1.json index 83444a6786..38f99dd374 100644 Binary files a/corporate/tests/stripe_fixtures/initial_upgrade:Token.create.1.json and b/corporate/tests/stripe_fixtures/initial_upgrade:Token.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.2.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.2.json index 19b6fd9718..52dc3a3050 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.2.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.3.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.3.json index 1b6bdd36cb..55a4050603 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.3.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.create.3.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.5.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.5.json index 8ad2369583..68e0a6bd74 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.5.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.5.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.6.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.6.json index 4b20db7024..c76ca69a90 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.6.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.6.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.7.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.7.json index d2d57cd408..3ace488ca8 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.7.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.7.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.8.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.8.json index 89f0d5d87a..5d1b04954d 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.8.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.retrieve.8.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.1.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.1.json index 8bb853efad..a7595fbbd7 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.1.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.1.json differ diff --git a/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.2.json b/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.2.json index b2c4cc4f21..344fa62eae 100644 Binary files a/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.2.json and b/corporate/tests/stripe_fixtures/payment_method_string:Customer.save.2.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.2.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.2.json index c898685ec4..87784f3fac 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.2.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.create.1.json index 938fda86ef..9ff2be73ac 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.1.json index 3681282b6d..59d13ca217 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.2.json index ed0007ef51..5137016d01 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.3.json index ed0007ef51..708b77e468 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.3.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Customer.retrieve.3.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.list.1.json index 940214314c..6f4ce5c9f4 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.upcoming.1.json index 3013729ef1..c9e78bbeb0 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.create.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.create.1.json index ecd42c8ccb..53369b71ac 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.save.1.json b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.save.1.json index 6a2d1c4759..20413b0223 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.save.1.json and b/corporate/tests/stripe_fixtures/upgrade_billing_by_invoice:Subscription.save.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_subscription_save_fails_at_first:Subscription.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_subscription_save_fails_at_first:Subscription.create.1.json index a7611b4554..2fa16eecad 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_subscription_save_fails_at_first:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_subscription_save_fails_at_first:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.create.1.json index f92f57d435..a296ccce06 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.retrieve.1.json index 3f7aacd6b7..c401894479 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Subscription.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Subscription.create.1.json index 754ab614d3..0b781e6f4d 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Subscription.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Subscription.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Token.create.1.json b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Token.create.1.json index 4032c6fad1..38f99dd374 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Token.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_with_outdated_seat_count:Token.create.1.json differ diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index 20a9fc33c8..fd293f69e6 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -129,6 +129,9 @@ def normalize_fixture_data(decorated_function: CallableT, keep: List[str]=[]) -> '"fingerprint": "[A-Za-z0-9]{16}"': '"fingerprint": "NORMALIZED%06d"', '"number": "[A-Za-z0-9]{7}-[A-Za-z0-9]{4}"': '"number": "NORMALI-%04d"', '"address": "[A-Za-z0-9]{9}-test_[A-Za-z0-9]{12}"': '"address": "000000000-test_NORMALIZED%02d"', + # Does not preserve relative ordering of the timestamps, nor any + # coordination with the timestamps in setUp mocks (e.g. Plan.created). + ': (1[5-9][0-9]{8})(?![0-9-])': '1%09d', }) normalized_values = {pattern: {} @@ -147,8 +150,10 @@ def normalize_fixture_data(decorated_function: CallableT, keep: List[str]=[]) -> file_content = re.sub(r'[0-3]\d [A-Z][a-z]{2} 20[1-2]\d', 'NORMALIZED DATE', file_content) # IP addresses file_content = re.sub(r'"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"', '"0.0.0.0"', file_content) + # Even normalized timestamps vary a lot run to run, so suppress + # timestamp differences entirely unless we explicitly ask to keep them if "timestamps" not in keep: - file_content = re.sub(r': 1[5-9][0-9]{8},', ': 1000000000,', file_content) + file_content = re.sub(r': 10000000\d{2}(?=[,$])', ': 1000000000', file_content) with open(fixture_file, "w") as f: f.write(file_content)