Example #1
0
    def test_keys(self):
        d = ServiceOptsDict()
        self.assertEqual(d.keys(), [])

        d = ServiceOptsDict({"omero.group": -1})
        k = d.keys()
        self.assert_(d.has_key('omero.group'))

        self.assertRaises(TypeError, d.keys, None)
Example #2
0
 def test_keys(self):
     d = ServiceOptsDict()
     assert d.keys() ==  []
     
     d = ServiceOptsDict({"omero.group":-1})
     k = d.keys()
     assert d.has_key('omero.group')
     
     pytest.raises(TypeError, d.keys, None)
Example #3
0
 def test_keys(self):
     d = ServiceOptsDict()
     self.assertEqual(d.keys(), [])
     
     d = ServiceOptsDict({"omero.group":-1})
     k = d.keys()
     self.assert_(d.has_key('omero.group'))
     
     self.assertRaises(TypeError, d.keys, None)
Example #4
0
    def test_has_key(self):
        d = ServiceOptsDict()
        self.assert_(not d.has_key('omero'))

        d = ServiceOptsDict({"omero.group": -1, "omero.user": 1})
        k = d.keys()
        k.sort()
        self.assertEqual(k, ['omero.group', 'omero.user'])

        self.assertRaises(TypeError, d.has_key)
Example #5
0
 def test_has_key(self):
     d = ServiceOptsDict()
     assert not d.has_key('omero')
     
     d = ServiceOptsDict({"omero.group":-1, "omero.user": 1})
     k = d.keys()
     k.sort()
     assert k ==  ['omero.group', 'omero.user']
     
     pytest.raises(TypeError, d.has_key)
Example #6
0
 def test_has_key(self):
     d = ServiceOptsDict()
     self.assert_(not d.has_key('omero'))
     
     d = ServiceOptsDict({"omero.group":-1, "omero.user": 1})
     k = d.keys()
     k.sort()
     self.assertEqual(k, ['omero.group', 'omero.user'])
     
     self.assertRaises(TypeError, d.has_key)