Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Backend
Commits
b45528d7
Commit
b45528d7
authored
May 17, 2021
by
Glenda Emanuella Sutanto
Browse files
Add response in midtrans redirection
parent
232883df
Changes
2
Hide whitespace changes
Inline
Side-by-side
payment/tests.py
View file @
b45528d7
...
...
@@ -169,6 +169,8 @@ class CartTests(APITestCase):
response
=
self
.
client
.
get
(
url
,
request_params
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_200_OK
)
self
.
cart_3
.
transaction_status
=
'pending'
self
.
assertEqual
(
response
.
data
,
CartSerializer
(
self
.
cart_3
).
data
)
self
.
assertEqual
(
DietQuestionnaire
.
objects
.
count
(),
1
)
self
.
assertEqual
(
DietQuestionnaire
.
objects
.
last
().
user
,
self
.
cart_3
.
user
)
self
.
assertEqual
(
DietRecommendation
.
objects
.
count
(),
1
)
...
...
payment/views.py
View file @
b45528d7
...
...
@@ -127,4 +127,4 @@ class MidtransRedirectionViewSet(viewsets.ViewSet):
nutritionist
=
cart
.
user
.
nutritionist
)
return
Response
(
status
=
status
.
HTTP_200_OK
)
return
Response
(
CartSerializer
(
cart
).
data
,
status
=
status
.
HTTP_200_OK
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment