Skip to content

Commit c20303c

Browse files
Fix a test
1 parent 7600bd1 commit c20303c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/unit/commands/rest_builder/test_oauth_model.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ def test_generated_oauth_endpoint(monkeypatch, tmp_path, mocked_http):
139139
file = tmp_path / "oauth_rh.py"
140140
file.write_text(builder.generate_rh())
141141

142+
# monkeypatch "socks" in httplib2 to avoid ImportError during import
143+
monkeypatch.setattr(httplib2, "socks", MagicMock())
144+
142145
# prepend the path to the file to sys.path
143146
monkeypatch.setattr(sys, "path", [str(tmp_path)] + sys.path)
144147

0 commit comments

Comments
 (0)