Unittest and mock
- by user1410756
I'm testing with unittest in python and it's ok. Now, I have introduced mock and I need to resolve a question. This is my code:
from mock import Mock
import unittest
class Matematica(object):
def __init__(self, op1, op2):
self.op1 = op1
self.op2 = op2
def adder(self):
return self.op1 + self.op2
def…