-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Enable dredd tests for some of the Orders API endpoints #7261
Conversation
discount_code = DiscountCodeTicketSubFactory( | ||
type='percent', value=10.0, tickets=[] | ||
) | ||
tickets_dict = _create_taxed_tickets( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local variable 'tickets_dict' is assigned to but never used
from tests.factories.faq_type import FaqTypeFactory | ||
from tests.factories.user_email import UserEmailFactory | ||
from tests.factories.feedback import FeedbackFactory | ||
from tests.factories.service import ServiceFactory | ||
from tests.factories.message_setting import MessageSettingsFactory | ||
from tests.factories.user_favourite_events import UserFavouriteEventFactory | ||
from tests.factories.discount_code import DiscountCodeTicketSubFactory | ||
|
||
from tests.all.integration.api.helpers.order.test_calculate_order_amount import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
@@ -167,7 +167,7 @@ def create_order(): | |||
db.session.commit() | |||
order.populate_and_save() | |||
|
|||
return OrderSchema().dumps(order) | |||
return OrderSchema().dump(order) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why dump instead of dumps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dumps was returning a string -> content/html whereas dump returned dictionary application/json. I saw that in the other places dump had been used.
docs/api/blueprint/order/orders.apib
Outdated
@@ -793,3 +626,114 @@ Create paypal payment | |||
"payment_id": "example", | |||
"error": null | |||
} | |||
|
|||
## Create Order [/v1/orders/create-order] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be placed in create order (1st section) place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -33,7 +33,11 @@ | |||
from tests.factories.event_copyright import EventCopyrightFactory | |||
from tests.factories.setting import SettingFactory | |||
from tests.factories.event_type import EventTypeFactory | |||
from tests.factories.discount_code import DiscountCodeFactory, DiscountCodeTicketFactory | |||
from tests.factories.discount_code import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module level import not at top of file
Codecov Report
@@ Coverage Diff @@
## development #7261 +/- ##
============================================
Coverage 63.55% 63.55%
============================================
Files 259 259
Lines 13034 13034
============================================
Hits 8284 8284
Misses 4750 4750
Continue to review full report at Codecov.
|
#7014
#7005
Short description of what this resolves:
Adds dredd tests for Orders API that were being skipped
Changes proposed in this pull request:
Checklist
development
branch.