Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ def unstub_conf():

set_up_mock_sp_store(syncedstore_mock)

# Do not read system files. Even if the tests run in container environment,
# report that we are running on bare metal.
self.in_container_patcher = patch("rhsm.config.in_container")
in_container_mock = self.in_container_patcher.start()
in_container_mock.return_value = False
self.addCleanup(self.in_container_patcher.stop)

self.files_to_cleanup = []

def tearDown(self):
Expand Down
6 changes: 6 additions & 0 deletions test/test_cp_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ def setUp(self):
"""
self.cp_provider = CPProvider()

# Do not try to perform TCP/TLS handshake during testing
self.conn_connect_patcher = patch("http.client.HTTPSConnection.connect")
conn_connect_mock = self.conn_connect_patcher.start()
conn_connect_mock.return_value = None
self.addCleanup(self.conn_connect_patcher.stop)

def test_create_cp_provider(self):
"""
Simple test of creating instance
Expand Down