Skip to content
All lessons

Tech Insights· docs.python.org

If you want to mock a class' property method in your tests you should use PropertyMock #unittest.mock.PropertyMock

From docs.python.org

Source code: Lib/unittest/mock.py unittest.mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they hav...

Shared by

Read on docs.python.org
  • Mock
  • Python
  • Tests

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us