diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.1.json index 2461b7f405..e613625c18 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.2.json index 233e594bb6..9296e91508 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.1.json index 57497dcf4e..e377e98ec7 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.2.json index a5b0b78e86..dc490546a1 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Charge.list.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.1.json index 265105506b..6209c97cd0 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.2.json index d41dfb5c02..1ba461db01 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.1.json index cf96248b7c..b38f239b58 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.2.json index 9771931b70..f6891db696 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.finalize_invoice.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.1.json index 79ad7b91fe..034cfe7c21 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.2.json index ab7c8480b1..f90ba9098d 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:Invoice.list.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.1.json index 604c1d0167..20b598fc44 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.2.json index 1768a0f9bb..513df7e0c5 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.3.json index 15ae400a25..309ebddbb6 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.3.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.3.json differ diff --git a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.4.json index 2e5300ced6..1aaf8baa6c 100644 Binary files a/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.4.json and b/corporate/tests/stripe_fixtures/attach_discount_to_realm:InvoiceItem.create.4.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Charge.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Charge.create.1.json index f467b0fbdd..86922f96e5 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Charge.create.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.create.1.json index 43c157cda1..efd9676112 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.create.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.1.json index 1db9a2eb50..74cd489a96 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.2.json index 1db9a2eb50..74cd489a96 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.create.1.json index f3f7611779..2036bc401d 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.finalize_invoice.1.json index 4d8163ba3b..4ff1484f65 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.1.json index 5cea8259c0..fb86949595 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.2.json index f796eeb199..052c9fd051 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Charge.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Charge.create.1.json index 54bd5a6f82..86922f96e5 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Charge.create.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Customer.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Customer.create.1.json index 2ba6926aca..efd9676112 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Customer.create.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.1.json index ab005bf57b..84e16f7a8c 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.2.json b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.2.json index 8e0138443a..d909197164 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.2.json and b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.1.json index 8aff0c37ff..c0410bd4f6 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.2.json b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.2.json index 869bd01b06..a943246316 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.2.json and b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.finalize_invoice.2.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.list.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.list.1.json index 510b16b12f..1d1ec178e5 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.1.json index 87b9365b50..fb86949595 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.2.json index 495f24f7ea..a8b457fd14 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.3.json b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.3.json index ad96238076..2ccd4026b0 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.3.json and b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.3.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.4.json b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.4.json index 3b79b854f6..775e43fbf0 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.4.json and b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.4.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.5.json b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.5.json index bbbb7a344e..72b44d3be7 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.5.json and b/corporate/tests/stripe_fixtures/invoice_plan:InvoiceItem.create.5.json differ diff --git a/corporate/tests/stripe_fixtures/invoice_plan:Token.create.1.json b/corporate/tests/stripe_fixtures/invoice_plan:Token.create.1.json index b400df63c2..60d47536e7 100644 Binary files a/corporate/tests/stripe_fixtures/invoice_plan:Token.create.1.json and b/corporate/tests/stripe_fixtures/invoice_plan:Token.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Charge.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Charge.create.1.json index f467b0fbdd..86922f96e5 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Charge.create.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.create.1.json index 43c157cda1..efd9676112 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.create.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.1.json index 1db9a2eb50..74cd489a96 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.2.json index c0ff70e204..e4ccdecce6 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.3.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.3.json index c0ff70e204..e4ccdecce6 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.3.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.3.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.4.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.4.json index c0ff70e204..e4ccdecce6 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.4.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.retrieve.4.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.1.json index 89de83f372..92e6750bfe 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Customer.save.1.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 445c8137ae..330bf8fad4 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/replace_payment_source:Invoice.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.create.1.json index f3f7611779..2036bc401d 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.finalize_invoice.1.json index 3d37e72441..4ff1484f65 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.1.json index 5cea8259c0..fb86949595 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.2.json index f796eeb199..052c9fd051 100644 Binary files a/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/replace_payment_source:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.create.1.json index 10f0e6b2db..eda5fcf12d 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.list.1.json index 5048736149..d92be4261e 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Charge.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.create.1.json index 13c340475e..32843c0933 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.1.json index ad3881b33b..af3085494e 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.2.json index ad3881b33b..af3085494e 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.create.1.json index 2d99ed3405..84e16f7a8c 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.finalize_invoice.1.json index ca7bc570eb..c0410bd4f6 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.list.1.json index 028871e4f6..b77242e8c5 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.1.json index 5cea8259c0..fb86949595 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.2.json index 41f53cd858..a8b457fd14 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/upgrade_by_card:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.create.1.json index ebcc9d7f61..eda5fcf12d 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.list.1.json index 58fe19525a..d92be4261e 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Charge.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Customer.create.1.json index 65bd59dd82..32843c0933 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.create.1.json index 46ae86b558..c90da0d36b 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.finalize_invoice.1.json index a5ef2ff1b2..05a187472c 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.list.1.json index c2b0ee3247..b253bd2741 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.1.json index e061261911..fb86949595 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.2.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.2.json index f154b7e9f6..822ff5f694 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.2.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:InvoiceItem.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Token.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Token.create.1.json index cc0d47cd24..b3a57bdcca 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Token.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_card_with_outdated_seat_count:Token.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.create.1.json index 81bab42e0b..8dc7e356e4 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.1.json index 368c0c84a2..826966811d 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.2.json index 368c0c84a2..826966811d 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.create.1.json index 4438bc1236..af1ae1bcd7 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.finalize_invoice.1.json index a4502d1ac2..2d10dc24af 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.list.1.json b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.list.1.json index dc0ff9cc5c..7515a3b60a 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_by_invoice:Invoice.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.1.json index 3e2712d623..1449692e89 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.2.json index 00ad4925f9..4ca2c328fc 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.2.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.create.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.1.json index fb45cc66ed..217eb6a28a 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.2.json index 71b48be1a0..d3fbf0866f 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.2.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Charge.list.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.create.1.json index 3c227a1492..47eb60fd52 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.1.json index e8fc81787c..709d321bae 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.2.json index e8fc81787c..709d321bae 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.2.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.retrieve.2.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.save.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.save.1.json index 43c157cda1..efd9676112 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.save.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Customer.save.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.create.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.create.1.json index e00cc01e22..b5e55c8e60 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.create.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.create.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.finalize_invoice.1.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.finalize_invoice.1.json index 2b70a4fbaf..d5390ad0fa 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.finalize_invoice.1.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.finalize_invoice.1.json differ diff --git a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.list.2.json b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.list.2.json index ac3902a83f..facfdc0942 100644 Binary files a/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.list.2.json and b/corporate/tests/stripe_fixtures/upgrade_where_first_card_fails:Invoice.list.2.json differ diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index a9e689055d..3289a9d894 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -120,7 +120,7 @@ def normalize_fixture_data(decorated_function: CallableT, id_lengths = [ ('cus', 14), ('sub', 14), ('si', 14), ('sli', 14), ('req', 14), ('tok', 24), ('card', 24), ('txn', 24), ('ch', 24), ('in', 24), ('ii', 24), ('test', 12), ('src_client_secret', 24), - ('src', 24), ('invst', 26)] + ('src', 24), ('invst', 26), ('acct', 16), ('rcpt', 31)] # We'll replace cus_D7OT2jf5YAtZQ2 with something like cus_NORMALIZED0001 pattern_translations = { "%s_[A-Za-z0-9]{%d}" % (prefix, length): "%s_NORMALIZED%%0%dd" % (prefix, length - 10) @@ -214,22 +214,19 @@ class Kandra(object): # nocoverage: TODO class StripeTestCase(ZulipTestCase): def setUp(self, *mocks: Mock) -> None: - # TODO - # Unfortunately this test suite is likely not robust to users being - # added in populate_db. A quick hack for now to ensure get_seat_count is 8 - # for these tests (8, since that's what it was when the tests were written). + # This test suite is not robust to users being added in populate_db. The following + # hack ensures get_seat_count is fixed, even as populate_db changes. realm = get_realm('zulip') - seat_count = get_seat_count(get_realm('zulip')) - assert(seat_count >= 8) - if seat_count > 8: # nocoverage - for user in UserProfile.objects.filter(realm=realm, is_active=True, is_bot=False) \ - .exclude(email__in=[ - self.example_email('hamlet'), - self.example_email('iago')])[6:]: - user.is_active = False - user.save(update_fields=['is_active']) - self.assertEqual(get_seat_count(get_realm('zulip')), 8) - self.seat_count = 8 + seat_count = get_seat_count(realm) + assert(seat_count >= 6) + for user in UserProfile.objects.filter(realm=realm, is_active=True, is_bot=False, is_guest=False) \ + .exclude(email__in=[ + self.example_email('hamlet'), + self.example_email('iago')])[:seat_count-6]: + user.is_active = False + user.save(update_fields=['is_active']) + self.assertEqual(get_seat_count(realm), 6) + self.seat_count = 6 self.signed_seat_count, self.salt = sign_string(str(self.seat_count)) # Choosing dates with corresponding timestamps below 1500000000 so that they are # not caught by our timestamp normalization regex in normalize_fixture_data