Комментарии:
Very good. I would like to see more videos about mocks but using magic mock
Ответитьthe explanation from beginning is awesome mahn! Very concise
Ответитьthat wasn't good example to teach mock 👎
Ответитьsuch great explanation. thank you
ОтветитьThis is now my GO TO channel for python. Absolutely top class tutorials!
ОтветитьMost people don't use mocks and they just hope that the database or the internet or whatever other service works during the test run phase. A good use case is when there is expected to get a reponse from the user like in the input() function, the test would just wait until someone input some data and press enter. Mocking the input() function allows the test to run uninterrupted.
ОтветитьA little chaotic and the examples were very well done.
ОтветитьThis channel is underrated AF!
ОтветитьThat assertEqual, for the first example using requests, is bad code. Testing that the value used in the mock is the value returned from the mocked call is nonsensical. Equivalent to testing that 1 == 1. Useless tests are worse than no tests.
ОтветитьThx_.
ОтветитьVery well explained. Thanks.
Ответить