Skip to content

Instantly share code, notes, and snippets.

@therefromhere
Last active June 8, 2019 03:09
Show Gist options
  • Select an option

  • Save therefromhere/2df98e0592fc5835d5ec3709320336b7 to your computer and use it in GitHub Desktop.

Select an option

Save therefromhere/2df98e0592fc5835d5ec3709320336b7 to your computer and use it in GitHub Desktop.

Revisions

  1. therefromhere revised this gist Jun 8, 2019. No changes.
  2. therefromhere created this gist Jun 8, 2019.
    336 changes: 336 additions & 0 deletions djstripe_fixture_regeneration.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,336 @@
    diff --git a/tests/fixtures/balance_transaction_txn_fake_ch_fakefakefakefakefake0001.json b/tests/fixtures/balance_transaction_txn_fake_ch_fakefakefakefakefake0001.json
    index edc7069..7e288ed 100644
    --- a/tests/fixtures/balance_transaction_txn_fake_ch_fakefakefakefakefake0001.json
    +++ b/tests/fixtures/balance_transaction_txn_fake_ch_fakefakefakefakefake0001.json
    @@ -5,7 +5,7 @@
    "available_on": 1558569600,
    "created": 1557995177,
    "currency": "usd",
    - "description": "Payment for invoice 3D77FB04-0001",
    + "description": "Payment for invoice 8898D96E-0001",
    "exchange_rate": null,
    "fee": 88,
    "fee_details": [
    diff --git a/tests/fixtures/card_card_fakefakefakefakefake0001.json b/tests/fixtures/card_card_fakefakefakefakefake0001.json
    index 6c3abc0..7ed756b 100644
    --- a/tests/fixtures/card_card_fakefakefakefakefake0001.json
    +++ b/tests/fixtures/card_card_fakefakefakefakefake0001.json
    @@ -16,7 +16,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    diff --git a/tests/fixtures/card_card_fakefakefakefakefake0002.json b/tests/fixtures/card_card_fakefakefakefakefake0002.json
    index 84f4b08..caf4891 100644
    --- a/tests/fixtures/card_card_fakefakefakefakefake0002.json
    +++ b/tests/fixtures/card_card_fakefakefakefakefake0002.json
    @@ -16,7 +16,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    diff --git a/tests/fixtures/card_card_fakefakefakefakefake0005.json b/tests/fixtures/card_card_fakefakefakefakefake0005.json
    index d50877d..81e5b12 100644
    --- a/tests/fixtures/card_card_fakefakefakefakefake0005.json
    +++ b/tests/fixtures/card_card_fakefakefakefakefake0005.json
    @@ -16,7 +16,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    diff --git a/tests/fixtures/charge_ch_fakefakefakefakefake0001.json b/tests/fixtures/charge_ch_fakefakefakefakefake0001.json
    index 570aeab..b6ee6cd 100644
    --- a/tests/fixtures/charge_ch_fakefakefakefakefake0001.json
    +++ b/tests/fixtures/charge_ch_fakefakefakefakefake0001.json
    @@ -24,7 +24,7 @@
    "created": 1557995177,
    "currency": "usd",
    "customer": "cus_6lsBvm5rJ0zyHc",
    - "description": "Payment for invoice 3D77FB04-0001",
    + "description": "Payment for invoice 8898D96E-0001",
    "destination": null,
    "dispute": null,
    "failure_code": null,
    @@ -41,7 +41,7 @@
    "network_status": "approved_by_network",
    "reason": null,
    "risk_level": "normal",
    - "risk_score": 42,
    + "risk_score": 10,
    "seller_message": "Payment complete.",
    "type": "authorized"
    },
    @@ -59,7 +59,7 @@
    "country": "US",
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "three_d_secure": null,
    @@ -92,7 +92,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {},
    diff --git a/tests/fixtures/customer_cus_4QWKsZuuTHcs7X.json b/tests/fixtures/customer_cus_4QWKsZuuTHcs7X.json
    index 3f7fca7..6e57441 100644
    --- a/tests/fixtures/customer_cus_4QWKsZuuTHcs7X.json
    +++ b/tests/fixtures/customer_cus_4QWKsZuuTHcs7X.json
    @@ -17,7 +17,7 @@
    "country": "US",
    "brand": "Visa",
    "funding": "credit",
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "three_d_secure": "optional",
    "name": null,
    "address_line1_check": null,
    @@ -54,7 +54,7 @@
    "description": "John Doe",
    "discount": null,
    "email": "[email protected]",
    - "invoice_prefix": "413F249C",
    + "invoice_prefix": "3BC90813",
    "invoice_settings": {
    "custom_fields": null,
    "default_payment_method": null,
    @@ -80,7 +80,7 @@
    "country": "US",
    "brand": "Visa",
    "funding": "credit",
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "three_d_secure": "optional",
    "name": null,
    "address_line1_check": null,
    diff --git a/tests/fixtures/customer_cus_4UbFSo9tl62jqj.json b/tests/fixtures/customer_cus_4UbFSo9tl62jqj.json
    index 20614cd..d02ab4b 100644
    --- a/tests/fixtures/customer_cus_4UbFSo9tl62jqj.json
    +++ b/tests/fixtures/customer_cus_4UbFSo9tl62jqj.json
    @@ -24,7 +24,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    @@ -37,7 +37,7 @@
    "description": "John Snow",
    "discount": null,
    "email": "[email protected]",
    - "invoice_prefix": "023474AA",
    + "invoice_prefix": "D7BE22B6",
    "invoice_settings": {
    "custom_fields": null,
    "default_payment_method": null,
    @@ -70,7 +70,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    @@ -178,7 +178,7 @@
    "total_count": 2,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0004"
    },
    - "latest_invoice": "in_1EhAAlCOCguPTL2BHKM8PujL",
    + "latest_invoice": "in_1EiuVkKatMEEd9987Wh7q6Tw",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0004"
    @@ -253,7 +253,7 @@
    "total_count": 1,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0003"
    },
    - "latest_invoice": "in_1EhAAjCOCguPTL2BRExZmp4c",
    + "latest_invoice": "in_1EiuVjKatMEEd998oipwiDnx",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0003"
    diff --git a/tests/fixtures/customer_cus_6lsBvm5rJ0zyHc.json b/tests/fixtures/customer_cus_6lsBvm5rJ0zyHc.json
    index 252ec53..bcaff57 100644
    --- a/tests/fixtures/customer_cus_6lsBvm5rJ0zyHc.json
    +++ b/tests/fixtures/customer_cus_6lsBvm5rJ0zyHc.json
    @@ -24,7 +24,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    @@ -37,7 +37,7 @@
    "description": "Michael Smith",
    "discount": null,
    "email": "[email protected]",
    - "invoice_prefix": "3D77FB04",
    + "invoice_prefix": "8898D96E",
    "invoice_settings": {
    "custom_fields": null,
    "default_payment_method": null,
    @@ -70,7 +70,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    @@ -97,7 +97,7 @@
    "dynamic_last4": null,
    "exp_month": 6,
    "exp_year": 2020,
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "funding": "credit",
    "last4": "4242",
    "metadata": {
    @@ -174,7 +174,7 @@
    "total_count": 1,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0002"
    },
    - "latest_invoice": "in_1EhAAgCOCguPTL2BajlVgKGV",
    + "latest_invoice": "in_1EiuVgKatMEEd998MuWLvUin",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0002"
    diff --git a/tests/fixtures/invoice_in_fakefakefakefakefake0001.json b/tests/fixtures/invoice_in_fakefakefakefakefake0001.json
    index 5ab3c65..44d2b58 100644
    --- a/tests/fixtures/invoice_in_fakefakefakefakefake0001.json
    +++ b/tests/fixtures/invoice_in_fakefakefakefakefake0001.json
    @@ -2,7 +2,7 @@
    "id": "in_fakefakefakefakefake0001",
    "object": "invoice",
    "account_country": "US",
    - "account_name": "dj-stripe scratch",
    + "account_name": "John Scratch",
    "amount_due": 2000,
    "amount_paid": 2000,
    "amount_remaining": 0,
    @@ -43,7 +43,7 @@
    "object": "list",
    "data": [
    {
    - "id": "sli_3445f2b5e035b0",
    + "id": "sli_93f0b1af0e3186",
    "object": "line_item",
    "amount": 2000,
    "currency": "usd",
    @@ -54,8 +54,8 @@
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0001"
    },
    "period": {
    - "end": 1562137289,
    - "start": 1559545289
    + "end": 1562553742,
    + "start": 1559961742
    },
    "plan": {
    "id": "gold21323",
    @@ -81,7 +81,7 @@
    "proration": false,
    "quantity": 1,
    "subscription": "sub_fakefakefakefakefake0001",
    - "subscription_item": "si_FBXFzo2zBOeeMy",
    + "subscription_item": "si_FDLCYcSC1urzLh",
    "tax_amounts": [],
    "tax_rates": [],
    "type": "subscription"
    @@ -96,7 +96,7 @@
    "djstripe_test_fake_id": "in_fakefakefakefakefake0001"
    },
    "next_payment_attempt": null,
    - "number": "3D77FB04-0001",
    + "number": "8898D96E-0001",
    "paid": true,
    "payment_intent": "pi_1EaeuqCOCguPTL2BkFAxFe4S",
    "period_end": 1557995176,
    @@ -108,9 +108,9 @@
    "statement_descriptor": null,
    "status": "paid",
    "status_transitions": {
    - "finalized_at": 1559545289,
    + "finalized_at": 1559961742,
    "marked_uncollectible_at": null,
    - "paid_at": 1559545289,
    + "paid_at": 1559961743,
    "voided_at": null
    },
    "subscription": "sub_fakefakefakefakefake0001",
    diff --git a/tests/fixtures/source_src_fakefakefakefakefake0001.json b/tests/fixtures/source_src_fakefakefakefakefake0001.json
    index c305f71..9246b3f 100644
    --- a/tests/fixtures/source_src_fakefakefakefakefake0001.json
    +++ b/tests/fixtures/source_src_fakefakefakefakefake0001.json
    @@ -9,7 +9,7 @@
    "country": "US",
    "brand": "Visa",
    "funding": "credit",
    - "fingerprint": "88PuXw9tEmvYe69o",
    + "fingerprint": "XBb4pv4IRQeImoJN",
    "three_d_secure": "optional",
    "name": null,
    "address_line1_check": null,
    diff --git a/tests/fixtures/subscription_sub_fakefakefakefakefake0002.json b/tests/fixtures/subscription_sub_fakefakefakefakefake0002.json
    index 97ef1c2..33435a9 100644
    --- a/tests/fixtures/subscription_sub_fakefakefakefakefake0002.json
    +++ b/tests/fixtures/subscription_sub_fakefakefakefakefake0002.json
    @@ -58,7 +58,7 @@
    "total_count": 1,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0002"
    },
    - "latest_invoice": "in_1EhAAgCOCguPTL2BajlVgKGV",
    + "latest_invoice": "in_1EiuVgKatMEEd998MuWLvUin",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0002"
    diff --git a/tests/fixtures/subscription_sub_fakefakefakefakefake0003.json b/tests/fixtures/subscription_sub_fakefakefakefakefake0003.json
    index 0b3822e..3a71b92 100644
    --- a/tests/fixtures/subscription_sub_fakefakefakefakefake0003.json
    +++ b/tests/fixtures/subscription_sub_fakefakefakefakefake0003.json
    @@ -58,7 +58,7 @@
    "total_count": 1,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0003"
    },
    - "latest_invoice": "in_1EhAAjCOCguPTL2BRExZmp4c",
    + "latest_invoice": "in_1EiuVjKatMEEd998oipwiDnx",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0003"
    diff --git a/tests/fixtures/subscription_sub_fakefakefakefakefake0004.json b/tests/fixtures/subscription_sub_fakefakefakefakefake0004.json
    index 355f5d1..79a3d10 100644
    --- a/tests/fixtures/subscription_sub_fakefakefakefakefake0004.json
    +++ b/tests/fixtures/subscription_sub_fakefakefakefakefake0004.json
    @@ -89,7 +89,7 @@
    "total_count": 2,
    "url": "/v1/subscription_items?subscription=sub_fakefakefakefakefake0004"
    },
    - "latest_invoice": "in_1EhAAlCOCguPTL2BHKM8PujL",
    + "latest_invoice": "in_1EiuVkKatMEEd9987Wh7q6Tw",
    "livemode": false,
    "metadata": {
    "djstripe_test_fake_id": "sub_fakefakefakefakefake0004"