Skip to content

Commit

Permalink
Merge pull request #6385 from jburel/remove_method
Browse files Browse the repository at this point in the history
remove test using deprecated method
  • Loading branch information
jburel authored Nov 20, 2024
2 parents c5d36ce + 8ab7627 commit 5448ded
Showing 1 changed file with 0 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,44 +42,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

0 comments on commit 5448ded

Please sign in to comment.