-
Notifications
You must be signed in to change notification settings - Fork 971
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
chapter 4, service layer exercise, "decrement" should be "increment" in test names #48
Comments
Hello Dmitry! thanks very much for these questions, it's nice to know someone is having a go at the exercises. I've pushed some clarifications/explanations as TODOs in the exercise code, let me know what you think? https://github.com/cosmicpython/code/blob/chapter_04_service_layer_exercise/test_services.py#L58 |
I've found exercises quite challenging so I think it fits quite nicely :) |
good luck! hey and if you have a couple of secs to write a review on amazon or goodreads or wherever you like to do that, it'd be much appreciated 😊 |
I'm having a question with the tests' names. As allocate decrements the available qunatity, should deallocate actually "increment" the available quantity? |
oh yes! you're quite right sorry |
In chapter 4, we are challenged to implement a deallocation service, given a link with some stubs for tests and some complete e2e tests.
There are some inaccuracies with the exercies which I have found:
code/test_services.py
Line 58 in 7efebb6
Test uses unexistent service
add_batch
. Shall we also implement it with tests? I would say yes. Maybe it worth to be included in the book itself?code/test_services.py
Line 59 in 7efebb6
Invalid call for a service.allocate() function.
Unclear cases:
code/test_services.py
Line 56 in 7efebb6
code/test_services.py
Line 67 in 7efebb6
What is an expected outcome of such functions? My intertpretation is that in first test we can deallocate any line with matching
orderid
andsku
which is allocated. In the second test we deallocate the line with matchingorderid
,sku
andqty
. Is it correct?The text was updated successfully, but these errors were encountered: