From: John Mulligan Date: Mon, 26 Sep 2022 19:33:41 +0000 (-0400) Subject: cephadm: fix some nonstandard formatting in fixtures.py X-Git-Tag: v18.1.0~1104^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7c8af995aa835f83e7961396c41ac627b17d4ce2;p=ceph.git cephadm: fix some nonstandard formatting in fixtures.py Signed-off-by: John Mulligan --- diff --git a/src/cephadm/tests/fixtures.py b/src/cephadm/tests/fixtures.py index c65e0a883df..ef61e68474b 100644 --- a/src/cephadm/tests/fixtures.py +++ b/src/cephadm/tests/fixtures.py @@ -39,11 +39,13 @@ def _daemon_path(): def mock_bad_firewalld(): def raise_bad_firewalld(): raise Exception('Called bad firewalld') + _cephadm = import_cephadm() f = mock.Mock(_cephadm.Firewalld) - f.enable_service_for = lambda _ : raise_bad_firewalld() - f.apply_rules = lambda : raise_bad_firewalld() - f.open_ports = lambda _ : raise_bad_firewalld() + f.enable_service_for = lambda _: raise_bad_firewalld() + f.apply_rules = lambda: raise_bad_firewalld() + f.open_ports = lambda _: raise_bad_firewalld() + def _mock_scrape_host(obj, interval): try: @@ -115,7 +117,7 @@ def host_sysfs(fs: fake_filesystem.FakeFilesystem): @contextmanager def with_cephadm_ctx( cmd: List[str], - list_networks: Optional[Dict[str,Dict[str,List[str]]]] = None, + list_networks: Optional[Dict[str, Dict[str, List[str]]]] = None, hostname: Optional[str] = None, ): """