Mercurial > hg > orthanc-tests
diff NewTests/helpers.py @ 576:80ba6f1d521c
new tests for authorization plugin (native only)
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 06 Sep 2023 17:04:36 +0200 |
parents | 10a47656e34f |
children | 0649a19df194 |
line wrap: on
line diff
--- a/NewTests/helpers.py Wed Sep 06 17:03:54 2023 +0200 +++ b/NewTests/helpers.py Wed Sep 06 17:04:36 2023 +0200 @@ -82,12 +82,17 @@ def tearDownClass(cls): if not Helpers.break_after_preparation: cls.kill_orthanc() + cls._terminate() @classmethod def prepare(cls): pass # to override @classmethod + def terminate(cls): + pass # to override + + @classmethod def _prepare(cls): if not Helpers.skip_preparation: cls.prepare() @@ -243,7 +248,10 @@ @classmethod def kill_orthanc(cls): if Helpers.is_exe(): - cls._orthanc_process.kill() + if cls._orthanc_process: + cls._orthanc_process.kill() + else: + return else: subprocess.run(["docker", "stop", cls._orthanc_container_name]) output = cls.get_orthanc_process_output()