diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index b396387..0235de2 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -116,10 +116,9 @@ async def jenkins_server_fixture(jenkins_server_model: Model) -> Application: async def server_unit_ip_fixture(jenkins_server_model: Model, jenkins_server: Application): """Get Jenkins machine server charm unit IP.""" status: FullStatus = await jenkins_server_model.get_status([jenkins_server.name]) + jenkins_application = typing.cast(Application, status.applications[jenkins_server.name]) try: - unit_status: UnitStatus = next( - iter(status.applications[jenkins_server.name].units.values()) - ) + unit_status: UnitStatus = next(iter(jenkins_application.units.values())) assert unit_status.address, "Invalid unit address" return unit_status.address except StopIteration as exc: diff --git a/tox.ini b/tox.ini index cfd5fc0..9af1971 100644 --- a/tox.ini +++ b/tox.ini @@ -36,9 +36,9 @@ description = Check code against coding style standards deps = black codespell - flake8<6.0.0 + flake8 flake8-builtins - flake8-copyright<6.0.0 + flake8-copyright flake8-docstrings>=1.6.0 flake8-docstrings-complete>=1.0.3 flake8-test-docs>=1.0 @@ -47,7 +47,7 @@ deps = pep8-naming pydocstyle>=2.10 pylint - pyproject-flake8<6.0.0 + pyproject-flake8 pytest pytest-asyncio pytest-operator