Skip to content

Commit ccf5476

Browse files
committed
add mock
1 parent 981d477 commit ccf5476

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ So, how can we unit test HTTP request methods calls without sending any HTTP req
338338

339339
## Mocking Python HTTP API call with Responses
340340

341-
So, what is a Mock object? A mock is a fake object that you construct to look and act like real data within a testing environment. The purpose of mocking is to isolate and focus on the code being tested and not on the behavior or state of external dependencies. We can simulates various scenario of the real data with mock object, then use a mock library to trick the system into thinking that that mock is the real data.
341+
A mock is a fake object that you construct to look and act like real data within a testing environment. The purpose of mocking is to isolate and focus on the code being tested and not on the behavior or state of external dependencies.
342342

343-
By mocking out external dependencies, developers can run tests as often without being affected by any unexpected changes or irregularities of those dependencies. Mocking also helps developers save time and computing resources if they have to test HTTP requests that fetch a lot of data.
343+
We can simulates various scenario of the real data with mock object, then use a mock library to trick the system into thinking that that mock is the real data. By mocking out external dependencies, developers can run tests as often without being affected by any unexpected changes or irregularities of those dependencies. Mocking also helps developers save time and computing resources if they have to test HTTP requests that fetch a lot of data.
344344

345345
This example project uses the [Responses](https://github.com/getsentry/responses) library which is specifically for mocking the Requests library.
346346

0 commit comments

Comments
 (0)