Closed sweep-ai[bot] closed 11 months ago
test_stripe.py
. β
Sandbox logs for
trunk fmt test_stripe.py || exit 0
1/2 ββ Formatted test_stripe.py Re-checking autofixed files... β Formatted test_stripe.py Re-checking autofixed files... Checked 1 file β No issues Run trunk upgrade to upgrade 1 plugin and 4 linters
trunk check --fix --print-failures test_stripe.py
2/2 β (`1`)ISSUES test_stripe.py:11:0 11:0 low Possible hardcoded password: 'sk_test_4eC39HqLyjWDarjtT1zdp7dc' bandit/B105 27:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 28:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 32:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 40:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 41:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 46:0 low Use of assert detected. The enclosed code will be removed when compiling to optimised byte bandit/B101 code. 53:1 high Module level import not at top of file ruff/E402 55:1 high Module level import not at top of file ruff/E402 55:8 high Redefinition of unused `stripe` from line 5 ruff/F811 56:1 high Module level import not at top of file ruff/E402 56:22 high Redefinition of unused `debug` from line 6 ruff/F811 57:1 high Module level import not at top of file ruff/E402 57:20 high Redefinition of unused `load_dotenv` from line 7 ruff/F811 Checked 1 file β 14 new issues
test_stripe.py
. β
Sandbox logs for https://github.com/PrenSJ2/teamworks_api/commit/1beee20c025786c78598aad8042db7922a89d0e8
trunk fmt test_stripe.py || exit 0
1/2 ββ Formatted test_stripe.py Re-checking autofixed files... β Formatted test_stripe.py Re-checking autofixed files... Checked 1 file β No issues Run trunk upgrade to upgrade 1 plugin and 4 linters
trunk check --fix --print-failures test_stripe.py
2/2 βChecked 1 file β No issues
test_stripe.py
. β
Sandbox logs for
trunk fmt test_stripe.py || exit 0
1/2 βChecked 1 file β No issues Run trunk upgrade to upgrade 1 plugin and 4 linters
trunk check --fix --print-failures test_stripe.py
2/2 βChecked 1 file β No issues
PR Feedback: π
Description
This pull request adds Pytest tests for all endpoints in the
test_stripe.py
file. It also includes some code formatting changes.Summary
stripe.api_key
assignment to use double quotes instead of single quotes.payment_intent_id
andcharge
.stripe.Refund.create
andstripe.PaymentMethod.list
.stripe.PaymentIntent.create
andpayment_intent
.payment_intent
assignment to retrieve the payment intent with the ID "pi_3NxHl8DzTJHYWfEw1auGrNXH".payment_intent
.Fixes #36.
π Latest improvements to Sweep:
rope
library to refactor Python! Check out Large Language Models are Bad at Refactoring Code. To have Sweep refactor your code, trysweep: Refactor <your_file>.py
!π‘ To get Sweep to edit this pull request, you can: