From fbae13da9e0139a3365f0d9634db0edfd6ff0e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 15 Nov 2023 20:25:51 +0000 Subject: [PATCH] Remove mox3 from the test requirements Update tests requirements to require OMERO.py 5.17.0 which deprecates the usage of mox3 for running integration tests Consume omero.testlib.cli.AbstractCLITest --- setup.py | 5 ++++- test/integration/clitest/cli.py | 22 +--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/setup.py b/setup.py index 8a7bc3f..7a83eae 100644 --- a/setup.py +++ b/setup.py @@ -128,5 +128,8 @@ def read(fname): download_url='%s/v%s.tar.gz' % (url, version), keywords=['OMERO.CLI', 'plugin'], cmdclass={'test': PyTest}, - tests_require=['pytest', 'restview', 'mox3'], + tests_require=[ + 'omero-py>=5.17.0', + 'pytest', + 'restview'], ) diff --git a/test/integration/clitest/cli.py b/test/integration/clitest/cli.py index 0699b84..2ef3a96 100644 --- a/test/integration/clitest/cli.py +++ b/test/integration/clitest/cli.py @@ -24,28 +24,8 @@ import pytest import omero -from omero.cli import CLI -from omero.plugins.sessions import SessionsControl from omero.rtypes import rstring - -from omero.testlib import ITest -from mox3 import mox - - -class AbstractCLITest(ITest): - - @classmethod - def setup_class(cls): - super(AbstractCLITest, cls).setup_class() - cls.cli = CLI() - cls.cli.register("sessions", SessionsControl, "TEST") - - def setup_mock(self): - self.mox = mox.Mox() - - def teardown_mock(self): - self.mox.UnsetStubs() - self.mox.VerifyAll() +from omero.testlib.cli import AbstractCLITest class CLITest(AbstractCLITest):