diff --git a/test_requirements.txt b/test_requirements.txt index e43c5c27..0f619376 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,6 +1,4 @@ -# workaround for juju == 3.5.0.0 -# https://github.com/juju/python-libjuju/issues/1052 -juju @ git+https://github.com/juju/python-libjuju.git@53cd33d884f3ca710e1fa026c74f31b02281be69 +juju pydantic<2 pylxd pytest diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index f914df64..08227e62 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -184,7 +184,7 @@ def switch(self, name: str, path: Path): def drop_constraints(self): """Remove constraints on applications. Useful for testing on lxd.""" for app in self.applications.values(): - app["constraints"] = None + app["constraints"] = '' def add_constraints(self, constraints: Dict[str, str]): """Add constraints to applications. @@ -193,7 +193,7 @@ def add_constraints(self, constraints: Dict[str, str]): constraints: Mapping of constraints to add to applications. """ for app in self.applications.values(): - val: str = app["constraints"] + val: str = app.get("constraints", "") existing = dict(kv.split("=", 1) for kv in val.split()) existing.update(constraints) app["constraints"] = " ".join(f"{k}={v}" for k, v in existing.items())