Skip to content

Commit 08f3f2f

Browse files
renzonrenzon
authored andcommitted
Updated dependencies
1 parent 15db726 commit 08f3f2f

File tree

3 files changed

+43
-44
lines changed

3 files changed

+43
-44
lines changed

Pipfile.lock

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pythonpro/domain/tests/test_checkout/test_boleto_generation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212
@pytest.fixture
1313
def pagarme_responses(transaction_json, captura_json):
1414
with responses.RequestsMock() as rsps:
15-
rsps.add(responses.GET, f'https://api.pagar.me/1/transactions/{TOKEN}', json=transaction_json)
16-
rsps.add(responses.POST, f'https://api.pagar.me/1/transactions/{TOKEN}/capture', json=captura_json)
15+
rsps.add(responses.GET, f'https://api.pagar.me/1/transactions/{TRANSACTION_ID}', json=transaction_json)
16+
rsps.add(responses.POST, f'https://api.pagar.me/1/transactions/{TRANSACTION_ID}/capture', json=captura_json)
1717
yield rsps
1818

1919

2020
TRANSACTION_ID = 7656690
21-
TOKEN = 'test_transaction_aJx9ibUmRqYcQrrUaNtQ3arTO4tF1z'
2221
BOLETO_URL = 'www.some.boleto.com'
2322
BOLETO_BARCODE = '123455'
2423

@@ -53,8 +52,9 @@ def sync_on_discourse_mock(mocker):
5352
@pytest.fixture
5453
def resp(client, pagarme_responses, create_or_update_lead_mock, payment_handler_task_mock, tag_as_mock,
5554
active_product_item, sync_on_discourse_mock):
56-
return client.get(reverse('django_pagarme:capture', kwargs={'token': TOKEN, 'slug': active_product_item.slug}),
57-
secure=True)
55+
return client.get(
56+
reverse('django_pagarme:capture', kwargs={'token': TRANSACTION_ID, 'slug': active_product_item.slug})
57+
)
5858

5959

6060
def test_status_code(resp):
@@ -95,7 +95,7 @@ def test_created_user_tagged_with_boleto(resp, django_user_model, tag_as_mock, a
9595
def resp_logged_user(client_with_lead, pagarme_responses, payment_handler_task_mock, tag_as_mock, active_product_item,
9696
remove_tags_mock):
9797
return client_with_lead.get(
98-
reverse('django_pagarme:capture', kwargs={'token': TOKEN, 'slug': active_product_item.slug}),
98+
reverse('django_pagarme:capture', kwargs={'token': TRANSACTION_ID, 'slug': active_product_item.slug}),
9999
secure=True
100100
)
101101

pythonpro/domain/tests/test_checkout/test_credit_card_payment.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
@pytest.fixture
1212
def pagarme_responses(transaction_json, captura_json):
1313
with responses.RequestsMock() as rsps:
14-
rsps.add(responses.GET, f'https://api.pagar.me/1/transactions/{TOKEN}', json=transaction_json)
15-
rsps.add(responses.POST, f'https://api.pagar.me/1/transactions/{TOKEN}/capture', json=captura_json)
14+
rsps.add(responses.GET, f'https://api.pagar.me/1/transactions/{TRANSACTION_ID}', json=transaction_json)
15+
rsps.add(responses.POST, f'https://api.pagar.me/1/transactions/{TRANSACTION_ID}/capture', json=captura_json)
1616
yield rsps
1717

1818

1919
TRANSACTION_ID = 7656690
20-
TOKEN = 'test_transaction_aJx9ibUmRqYcQrrUaNtQ3arTO4tF1z'
2120

2221

2322
@pytest.fixture
@@ -94,7 +93,7 @@ def resp(client, pagarme_responses, payment_handler_task_mock, create_or_update_
9493
create_or_update_bootcamper_mock, active_product_item, remove_tags_mock, sync_on_discourse_mock,
9594
create_or_update_pythonist_mock):
9695
return client.get(
97-
reverse('django_pagarme:capture', kwargs={'token': TOKEN, 'slug': active_product_item.slug})
96+
reverse('django_pagarme:capture', kwargs={'token': TRANSACTION_ID, 'slug': active_product_item.slug})
9897
)
9998

10099

@@ -164,7 +163,7 @@ def resp_logged_user(client_with_user, pagarme_responses, payment_handler_task_m
164163
create_or_update_data_scientist_mock, create_or_update_bootcamper_mock,
165164
create_or_update_pythonist_mock):
166165
return client_with_user.get(
167-
reverse('django_pagarme:capture', kwargs={'token': TOKEN, 'slug': active_product_item.slug})
166+
reverse('django_pagarme:capture', kwargs={'token': TRANSACTION_ID, 'slug': active_product_item.slug})
168167
)
169168

170169

0 commit comments

Comments
 (0)