Skip to content

Commit

Permalink
Auto close fetcher session
Browse files Browse the repository at this point in the history
  • Loading branch information
alfinkel committed Aug 31, 2020
1 parent e256d2f commit 8849812
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# UNRELEASED

- [FIXED] ComplianceFetcher session object is auto-closed now in tearDownClass.

# 1.2.7

- [CHANGED] Removed PyYAML dependency to resolve downstream dependency issues.
Expand Down
6 changes: 5 additions & 1 deletion compliance/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
class ComplianceFetcher(unittest.TestCase):
"""Compliance fetcher automation TestCase class."""

_multiprocess_can_split_ = True
@classmethod
def tearDownClass(cls):
"""Perform clean up."""
if hasattr(cls, '_session'):
cls._session.close()

@classmethod
def session(cls, url=None, creds=None, **headers):
Expand Down

0 comments on commit 8849812

Please sign in to comment.