Revision abd66bf8 test/ganeti.cmdlib_unittest.py
b/test/ganeti.cmdlib_unittest.py | ||
---|---|---|
143 | 143 |
class TestLUQuery(unittest.TestCase): |
144 | 144 |
def test(self): |
145 | 145 |
self.assertEqual(sorted(cmdlib._QUERY_IMPL.keys()), |
146 |
sorted(constants.QR_OP_QUERY))
|
|
146 |
sorted(constants.QR_VIA_OP))
|
|
147 | 147 |
|
148 |
assert constants.QR_NODE in constants.QR_OP_QUERY
|
|
149 |
assert constants.QR_INSTANCE in constants.QR_OP_QUERY
|
|
148 |
assert constants.QR_NODE in constants.QR_VIA_OP
|
|
149 |
assert constants.QR_INSTANCE in constants.QR_VIA_OP
|
|
150 | 150 |
|
151 |
for i in constants.QR_OP_QUERY:
|
|
151 |
for i in constants.QR_VIA_OP:
|
|
152 | 152 |
self.assert_(cmdlib._GetQueryImplementation(i)) |
153 | 153 |
|
154 | 154 |
self.assertRaises(errors.OpPrereqError, cmdlib._GetQueryImplementation, "") |
Also available in: Unified diff