Closed atward closed 7 years ago
So anyway, these tests were breaking in tox because of this https://github.com/delfick/bespin/commit/8b6fad9b34f371eb84749953652d44033f9c98d9 (tox doesn't set a USER variable and so that code was breaking the response from moto)
And also, https://github.com/delfick/bespin/commit/1b79a338bb4d729d65672da0972dad5e7d392a27, environment variables from one test was changing the behaviour of another test.
Would it be better/possible to mock a clone of os.environ for the particular unittests which would modify the environment?
possibly, should be possible with mock.patch.dict https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch.dict
unittest.mock is only available post python 3.3
that's why it's a dep in setup.py https://github.com/delfick/bespin/blob/master/setup.py#L37
Oh python2.6. You so silly.