Answer the question
In order to leave comments, you need to log in
How to check in the test that there was a call to the property of the object?
There is a method that takes an object as an argument and accesses some properties (@property) of this object.
class Event:
@property
def number(self):
return 123
def myFunction(event):
return event.number * 10
class MockEvent:
def __init__(self):
self.number = Mock(return_value=10)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question