from flexmock import flexmock
class Addition:
def add(self,num1,num2):
return num1+num2
creating a mock
mock=Addition()
flexmock(mock)
mock.should_receive('add')
assert mock.add(1,2)==3
I have mocked the Addition class using flexmock. Now Suppose If I further want to make sure that add method only receive integer value. How do I write the test case for added requirement. Or am I following the totally wrong path ?