
Following a recent change in Python[1], mock_open now invokes close() when used as a context manager. This causes some of our tests to fail. This commit rewrites part of these tests to be less dependant on internal Python details. [1] https://github.com/python/cpython/pull/26902 Change-Id: Iad9c0f0bf7f34d5cf209ec10863b28ddde281d7e Signed-off-by: Cyril Roelandt <cyril@redhat.com>