SECTION 33 / 48

What Is a Stub?

1 min read

A stub is a dummy procedure with the same input/output parameters as the function the module calls, with highly simplified behaviour.

In the demo, get_total_items is not yet implemented by another developer. Define mock_get_total_items to sum seller_inventory_map and use a mock with side_effect=mock_get_total_items in the test.

What Is a Stub?
What Is a Stub?
Open image ↗
What Is a Stub?
YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑