Skip to content

Commit

Permalink
testlib: deprecate setup_mock method using mox3
Browse files Browse the repository at this point in the history
  • Loading branch information
sbesson committed Oct 25, 2023
1 parent b4a5342 commit 614a2e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/omero/testlib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
from omero.rtypes import rstring

from omero.testlib import ITest
from mox3 import mox

import warnings

class AbstractCLITest(ITest):

Expand All @@ -40,9 +41,16 @@ def setup_class(cls):
cls.cli.register("sessions", SessionsControl, "TEST")

def setup_mock(self):
from mox3 import mox
warnings.warn(
"The usage of mox3 is deprecated as of OMERO.py 5.17.0",
DeprecationWarning)
self.mox = mox.Mox()

def teardown_mock(self):
warnings.warn(
"The usage of mox3 is deprecated as of OMERO.py 5.17.0",
DeprecationWarning)
self.mox.UnsetStubs()
self.mox.VerifyAll()

Expand Down

0 comments on commit 614a2e2

Please sign in to comment.