Skip to content

Commit 5dd4367

Browse files
committed
Merge pull request ome#3999 from ximenesuk/add-ctor-test
Add an additional Python client ctor test
2 parents a3b66cc + 1aa0cdb commit 5dd4367

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

components/tools/OmeroPy/src/omero/plugins/export.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
omero export --file new.ome.xml --type XML Image:1
2121
omero export --file output-dir --iterate Dataset:2
2222
23-
If --iterate is used used, the only supported obj is Dataset:<id>
23+
If --iterate is used, the only supported obj is Dataset:<id>
2424
"""
2525

2626

components/tools/OmeroPy/test/integration/test_client_ctors.py

+16-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ def testHostConstructor(self):
5353
except:
5454
c.__del__()
5555

56-
def testInitializationDataConstructor(self):
56+
def testEmptyInitializationDataConstructor(self):
5757
id = Ice.InitializationData()
58+
# With no argument id.properties is empty
5859
id.properties = Ice.createProperties()
5960
id.properties.setProperty("omero.host", self.host)
6061
id.properties.setProperty("omero.port", str(self.port))
@@ -69,6 +70,20 @@ def testInitializationDataConstructor(self):
6970
finally:
7071
c.__del__()
7172

73+
def testInitializationDataConstructor(self):
74+
id = Ice.InitializationData()
75+
id.properties = Ice.createProperties([])
76+
id.properties.setProperty("omero.user", "root")
77+
id.properties.setProperty("omero.pass", self.rootpasswd)
78+
c = omero.client(id=id)
79+
try:
80+
c.createSession()
81+
c.closeSession()
82+
c.createSession()
83+
c.closeSession()
84+
finally:
85+
c.__del__()
86+
7287
def testMainArgsConstructor(self):
7388
args = ["--omero.host="+self.host,
7489
"--omero.user=root", "--omero.pass=" + self.rootpasswd]

0 commit comments

Comments
 (0)