title: mock.patch.dict at class level - python unit test
body: <p>I have a dictionary which looks like this and is needed needed by all methods in the test class, is there a way to <code>@mock.patch.dict</code> it at class level rather than doing it at top of each method. The dictionary is set some <code>os.environ</code> variables as shown here:</p>
  
  <pre><code>@mock.patch.dict('os.environ',
                   {'MSSQL_DB_NAME': 'tempdb', 
                    'MSSQL_USERNAME': 'sa', 
                    'MSSQL_PASSWORD': 'password',
                    'MSSQL_DSN': 'MYMSSQL'})
  @mock.patch("commonutils.connectors.mssql.pyodbc")
  def test_connectivity(self, my_pyodbc):
      self.db = Database(os.environ['MSSQL_DB_NAME'], 
                         os.environ['MSSQL_DSN'], 
                         os.environ['MSSQL_USERNAME'],
                         os.environ['MSSQL_PASSWORD'])
  </code></pre>