Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove test using deprecated method #6385

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,44 +45,6 @@ def testMultiProcessSession(self, gatewaywrapper):
c3, a.containedGroups(c3.getUserId())[1])
c3.setGroupForSession(g)

# seppuku is deprecated: testClose below supersedes this test
@pytest.mark.filterwarnings("ignore:.*U.*close.*:DeprecationWarning")
def testSeppuku(self, gatewaywrapper, author_testimg):
# author_testimg in args to make sure the image has been imported
gatewaywrapper.loginAsAuthor()
assert gatewaywrapper.getTestImage() is not None
gatewaywrapper.gateway.seppuku()
pytest.raises(Ice.ConnectionLostException, gatewaywrapper.getTestImage)
gatewaywrapper._has_connected = False
gatewaywrapper.doDisconnect()
gatewaywrapper.loginAsAuthor()
assert gatewaywrapper.getTestImage() is not None
gatewaywrapper.gateway.seppuku(softclose=False)
pytest.raises(Ice.ConnectionLostException, gatewaywrapper.getTestImage)
gatewaywrapper._has_connected = False
gatewaywrapper.doDisconnect()
# Also make sure softclose does the right thing
gatewaywrapper.loginAsAuthor()
g2 = gatewaywrapper.gateway.clone()

def g2_getTestImage():
return dbhelpers.getImage(g2, 'testimg1')
assert g2.connect(gatewaywrapper.gateway._sessionUuid)
assert gatewaywrapper.getTestImage() is not None
assert g2_getTestImage() is not None
g2.seppuku(softclose=True)
pytest.raises(Ice.ConnectionLostException, g2_getTestImage)
assert gatewaywrapper.getTestImage() is not None
g2 = gatewaywrapper.gateway.clone()
assert g2.connect(gatewaywrapper.gateway._sessionUuid)
assert gatewaywrapper.getTestImage() is not None
assert g2_getTestImage() is not None
g2.seppuku(softclose=False)
pytest.raises(Ice.ConnectionLostException, g2_getTestImage)
pytest.raises(Ice.ObjectNotExistException, gatewaywrapper.getTestImage)
gatewaywrapper._has_connected = False
gatewaywrapper.doDisconnect()

def testClose(self, gatewaywrapper, author_testimg):
# author_testimg in args to make sure the image has been imported
gatewaywrapper.loginAsAuthor()
Expand Down