Skip to content

Commit 48eba6e

Browse files
committed
try tests with mock response
1 parent 96c95be commit 48eba6e

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

mpcontribs-client/mpcontribs/client/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ def _load(protocol, host, headers_json, project):
415415
resp = _run_futures([future], timeout=3).get(track_id, {}).get("result")
416416
session.close()
417417

418-
print(resp)
419418
if not resp or not resp["data"]:
420419
return swagger_spec # skip in tests
421420

mpcontribs-client/mpcontribs/client/test_client.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import pytest
33

4-
from unittest.mock import patch, MagicMock
54
from mpcontribs.client import validate_email, Client, DEFAULT_HOST, email_format
65
from swagger_spec_validator.common import SwaggerValidationError
76

@@ -13,16 +12,6 @@ def test_validate_email():
1312
validate_email("fake:info@example.com")
1413

1514

16-
@patch(
17-
"bravado.swagger_model.Loader.load_spec",
18-
new=MagicMock(
19-
return_value={
20-
"swagger": "2.0",
21-
"paths": {},
22-
"info": {"title": "Swagger", "version": "0.0"},
23-
}
24-
),
25-
)
2615
def test_Client():
2716
kwargs = {"apikey": "1234"}
2817
spec = Client(**kwargs).swagger_spec

0 commit comments

Comments
 (0)