Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
blackify
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb15 committed Aug 11, 2022
1 parent 80545ae commit 57beb4f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
],
keywords="insert your keywords here",
packages=find_packages(),
install_requires=["requests==2.22.0",],
install_requires=[
"requests==2.22.0",
],
python_requires=">=3.6",
)
25 changes: 19 additions & 6 deletions tests/test_healthchecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def test_get_endpoint_if_not_cached_but_exists_in_website():
API_URL_BASE + "/checks/",
json={
"checks": [
{"name": "spongebob", "ping_url": "https://hc-ping.com/55555555",}
{
"name": "spongebob",
"ping_url": "https://hc-ping.com/55555555",
}
]
},
)
Expand All @@ -58,7 +61,9 @@ def test_get_endpoint_if_not_cached_but_exists_in_website():
@responses.activate
def test_get_endpoint_if_does_not_exist():
responses.add(
responses.GET, API_URL_BASE + "/checks/", json={"checks": []},
responses.GET,
API_URL_BASE + "/checks/",
json={"checks": []},
)
responses.add(responses.GET, API_URL_BASE + "/channels/", json={"channels": []})
responses.add(
Expand All @@ -74,7 +79,9 @@ def test_get_endpoint_if_does_not_exist():
def test_get_endpoint_if_does_not_exist_with_cache_override():
manager.cache = MockRedisCache()
responses.add(
responses.GET, API_URL_BASE + "/checks/", json={"checks": []},
responses.GET,
API_URL_BASE + "/checks/",
json={"checks": []},
)
responses.add(
responses.POST,
Expand All @@ -89,7 +96,9 @@ def test_get_endpoint_if_does_not_exist_with_cache_override():
@responses.activate
def test_create_check():
responses.add(
responses.POST, API_URL_BASE + "/checks/", json={"ping_url": "foo"},
responses.POST,
API_URL_BASE + "/checks/",
json={"ping_url": "foo"},
)
endpoint = manager.create_check("")
assert endpoint == "foo"
Expand All @@ -103,7 +112,9 @@ def test_create_check_with_channel():
json={"channels": [{"name": "slack", "id": "112536"}]},
)
responses.add(
responses.POST, API_URL_BASE + "/checks/", json={"ping_url": "foo"},
responses.POST,
API_URL_BASE + "/checks/",
json={"ping_url": "foo"},
)
endpoint = manager.create_check("fah", {"channels": ["slack"]})
assert "foo" == endpoint
Expand All @@ -114,7 +125,9 @@ def test_create_check_with_channel():
def test_default_creation_params_can_be_overridden():
manager.default_creation_params["timeout"] = 5326
responses.add(
responses.POST, API_URL_BASE + "/checks/", json={"ping_url": "foo"},
responses.POST,
API_URL_BASE + "/checks/",
json={"ping_url": "foo"},
)
manager.create_check("fah", {"timeout": 142})
assert "5326" not in responses.calls[0].request.body
Expand Down

0 comments on commit 57beb4f

Please sign in to comment.