* Source Github: handle 502 Bad Gateway with proper log message * Source Github: bump version * Source Github: update changelog for new 0.3.12 version * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
96e16a890f
commit
d1688c7287
@@ -189,6 +189,26 @@ def test_stream_teams_404():
|
||||
assert responses.calls[0].request.url == "https://api.github.com/orgs/org_name/teams?per_page=100"
|
||||
|
||||
|
||||
@responses.activate
|
||||
@patch("time.sleep")
|
||||
def test_stream_teams_502(sleep_mock):
|
||||
organization_args = {"organizations": ["org_name"]}
|
||||
stream = Teams(**organization_args)
|
||||
|
||||
url = "https://api.github.com/orgs/org_name/teams"
|
||||
responses.add(
|
||||
method="GET",
|
||||
url=url,
|
||||
status=requests.codes.BAD_GATEWAY,
|
||||
json={"message": "Server Error"},
|
||||
)
|
||||
|
||||
assert list(read_full_refresh(stream)) == []
|
||||
assert len(responses.calls) == 6
|
||||
# Check whether url is the same for all response.calls
|
||||
assert set(call.request.url for call in responses.calls).symmetric_difference({f"{url}?per_page=100"}) == set()
|
||||
|
||||
|
||||
@responses.activate
|
||||
def test_stream_organizations_read():
|
||||
organization_args = {"organizations": ["org1", "org2"]}
|
||||
|
||||
Reference in New Issue
Block a user