title: Python patch object with a side_effect
body: <p>I'm trying to have a Mock object return certain values based on the input given. I looked up a few examples on SO and for some reason I still can't get it to work. Here's what I have right now.</p>
  
  <pre><code>class EmailChecker():
      def is_email_correct(email):
          some regex to determine if email is valid, returns either True or False
  
  def my_side_effect(**args):
      if args[0] == '1':
          return True
      else:
          return False
  
  myMock = mock.patch.object(EmailChecker, 'is_email_correct', side_effect=my_side_effect)
  </code></pre>
  
  <p>Yet it doesn't seem to work. What am I missing here?</p>