fixing unit test: AttributeError: GzipFile instance has no attribute '__exit__'