(self)
| 135 | |
| 136 | class BaseEnvVar(unittest.TestCase): |
| 137 | def setUp(self): |
| 138 | # Automatically patches out os.environ for you |
| 139 | # and gives you a self.environ attribute that simulates |
| 140 | # the environment. Also will automatically restore state |
| 141 | # for you in tearDown() |
| 142 | self.environ = {} |
| 143 | self.environ_patch = mock.patch('os.environ', self.environ) |
| 144 | self.environ_patch.start() |
| 145 | |
| 146 | def tearDown(self): |
| 147 | self.environ_patch.stop() |