-
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
fix: Correct invoice permissions and disable post, patch, delete #7312
Conversation
|
||
|
||
def test_invoice_post_user_error(client, jwt): | ||
data = json.dumps({'data': {'type': 'event-invoice', 'attributes': {'amount': 100},}}) |
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.
missing whitespace after ','
|
||
|
||
def test_invoice_post_admin_error(client, admin_jwt): | ||
data = json.dumps({'data': {'type': 'event-invoice', 'attributes': {'amount': 100},}}) |
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.
missing whitespace after ','
get_invoice(db, user) | ||
|
||
response = client.get( | ||
'/v1/event-invoices', content_type='application/vnd.api+json', headers=jwt, |
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.
Black would make changes.
@@ -4,17 +4,14 @@ | |||
from flask_jwt_extended import current_user | |||
from flask_rest_jsonapi import ResourceDetail, ResourceList, ResourceRelationship | |||
|
|||
from app.api.bootstrap import api | |||
from app.api.helpers.db import safe_query, safe_query_kwargs, save_to_db | |||
from app.api.helpers.db import safe_query, safe_query_by_id, safe_query_kwargs, save_to_db |
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.
Black would make changes.
46f08c3
to
d97ca68
Compare
Codecov Report
@@ Coverage Diff @@
## development #7312 +/- ##
===============================================
+ Coverage 64.00% 64.12% +0.12%
===============================================
Files 259 259
Lines 13075 13078 +3
===============================================
+ Hits 8368 8386 +18
+ Misses 4707 4692 -15
Continue to review full report at Codecov.
|
Add tests to ensure permissions are working correctly
For fossasia/open-event-frontend#5212