Skip to content

Added option to include endpoint details #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 29, 2024
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
14 changes: 7 additions & 7 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: "3.8"
- name: Check formatting
Expand All @@ -22,9 +22,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: "3.8"
- name: Lint with flake8
Expand All @@ -49,12 +49,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.1.0
uses: actions/setup-python@v5.3.0
with:
python-version: "3.8"
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions ssllabs/ssllabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async def analyze(
fromCache="on" if from_cache else "off",
publish="on" if publish else "off",
ignoreMismatch="on" if ignore_mismatch else "off",
all="done",
maxAge=max_age,
)
self._semaphore.release()
Expand Down
11 changes: 0 additions & 11 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,3 @@ def test_data_fixture(request):
with file.open("r") as fh:
test_data = json.load(fh)
setattr(request.cls, filename, test_data)


@pytest.fixture()
def event_loop():
loop = asyncio.get_event_loop()
yield loop
to_cancel = asyncio.tasks.all_tasks(loop)
for task in to_cancel:
task.cancel()
loop.run_until_complete(asyncio.tasks.gather(*to_cancel, return_exceptions=True))
loop.close()
2 changes: 2 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ async def test_api(self, request, httpx_mock):
httpx_mock.add_response(json=request.cls.info)
r = await _Api()._call("") # pylint: disable=protected-access
assert r.json() == request.cls.info

httpx_mock.add_response(json=request.cls.info)
client = AsyncClient()
r = await _Api(client)._call("") # pylint: disable=protected-access
await client.aclose()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ssllabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ async def test_analyze(self, request: pytest.FixtureRequest) -> None:
api_data = await ssllabs.analyze(host="devolo.de")
assert dataclasses.asdict(api_data) == request.cls.analyze
get.assert_called_with(
host="devolo.de", ignoreMismatch="off", publish="off", startNew="on", fromCache="off", maxAge=None
host="devolo.de", ignoreMismatch="off", publish="off", startNew="on", fromCache="off", maxAge=None, all="done"
)
api_data = await ssllabs.analyze(host="devolo.de", from_cache=True, max_age=1)
assert dataclasses.asdict(api_data) == request.cls.analyze
get.assert_called_with(
host="devolo.de", ignoreMismatch="off", publish="off", startNew="off", fromCache="on", maxAge=1
host="devolo.de", ignoreMismatch="off", publish="off", startNew="off", fromCache="on", maxAge=1, all="done"
)

@pytest.mark.asyncio
Expand Down