title: How to mock a dictionary in Python
body: <p>Let's say I have a function like this:</p>
  
  <pre><code>def do_something(dict_obj):
     # access to the dict_obj then do some stuff
     eg.
     if dict_obj['doors']:
        do_something_with_doors()
     map_car_make(dict_obj['make'])
     ...
  
     if dict_obj['is_active']:
          do_something_else()
  </code></pre>
  
  <p>I want to mock the <code>dict_obj</code> to have <code>is_active</code> element and don't care the rest, how do I do that?</p>