-
Notifications
You must be signed in to change notification settings - Fork 18
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
For #430: TableListView test with authentication. #506
Conversation
Job #506 is now in scope, role is |
Codecov Report
@@ Coverage Diff @@
## master #506 +/- ##
==========================================
- Coverage 88.35% 87.91% -0.45%
==========================================
Files 55 55
Lines 1005 1018 +13
Branches 55 57 +2
==========================================
+ Hits 888 895 +7
- Misses 96 100 +4
- Partials 21 23 +2
Continue to review full report at Codecov.
|
This pull request #506 is assigned to @vryazanov/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @emilianodellacasa/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be a monetary reward for this job |
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.
@paulodamaso I left a few comments, pls have a look
with client.session_transaction() as session: | ||
session["user_id"] = employee.id | ||
g.user = employee | ||
factories.TableFactory(floor_id=floor.id, name="Table 01") |
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.
@paulodamaso Factory provides method for bulk creation:
factories.TableFactory.create_batch(size=3, floor_id=floor.id, name="Table 01")
tests/view/tables/test_tables.py
Outdated
response = client.get("/tables/") | ||
print(response.data) |
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.
@paulodamaso let's remove print :)
tests/view/tables/test_tables.py
Outdated
g.user = employee | ||
factories.TableFactory(floor_id=floor.id, name="Table 01") | ||
factories.TableFactory(floor_id=floor.id, name="Table 01") | ||
factories.TableFactory(floor_id=floor.id, name="Table 01") | ||
response = client.get("/tables/") |
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.
@paulodamaso let's add url_for
instead of url. wdyt?
@vladarefiev Thanks for the comments, please take a look at the corrections. About the |
@rultor merge |
@vryazanov Thanks for your request. @emilianodellacasa Please confirm this. |
@rultor merge |
@emilianodellacasa OK, I'll try to merge now. You can check the progress of the merge here |
@emilianodellacasa Done! FYI, the full log is here (took me 8min) |
@ypshenychka/z please review this job completed by @vryazanov/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed |
Job #506 is not in the agenda of @vryazanov/z, can't inspect |
The job #506 is now out of scope |
Payment to |
@vryazanov According to our QA Rules:
Only two issues were found during code review. |
@vryazanov ping |
@ypshenychka @emilianodellacasa I confirm |
@0crat quality acceptable |
Quality review completed: +4 point(s) just awarded to @emilianodellacasa/z |
Order was finished, quality is "acceptable": +15 point(s) just awarded to @vryazanov/z |
@emilianodellacasa It's still in my agenda |
@0crat refuse |
@emilianodellacasa Job |
@ypshenychka now? |
@emilianodellacasa Still on the list... |
@0crat out |
@ypshenychka going trial-and-error here :-) now? |
@emilianodellacasa Job |
This job is not in scope |
@0crat status |
@ypshenychka should be ok now, confirm? |
@emilianodellacasa Still there |
@ypshenychka can you wait the issue? |
@emilianodellacasa It's not bothering me, but would be nice if it goes away from my agenda someday :) |
@ypshenychka It would be better to open a new issue on zerocracy and ask for advice to solve current situation, what do you think? |
@emilianodellacasa Good idea. Will do. Thanks |
@emilianodellacasa BTW my agenda is now clear. Not sure how it happened, but issue is not actual anymore :) |
For #430:
TableListView
test with authentication.TableListView
mocking authenticated user related toCompany
,Floor
andLocation
(to make sure that the user has permission to some group of tables)TableListView
, which is broken: it just returns the header of the page