Revision 1dee2041
b/test/py/ganeti.hypervisor.hv_xen_unittest.py | ||
---|---|---|
288 | 288 |
self.assertRaises(KeyError, hv_xen._GetConfigFileDiskData, disks, "sd") |
289 | 289 |
|
290 | 290 |
|
291 |
class TestXenHypervisorUnknownCommand(unittest.TestCase): |
|
292 |
def test(self): |
|
293 |
cmd = "#unknown command#" |
|
294 |
self.assertFalse(cmd in constants.KNOWN_XEN_COMMANDS) |
|
295 |
hv = hv_xen.XenHypervisor(_cfgdir=NotImplemented, |
|
296 |
_run_cmd_fn=NotImplemented, |
|
297 |
_cmd=cmd) |
|
298 |
self.assertRaises(errors.ProgrammerError, hv._RunXen, []) |
|
299 |
|
|
300 |
|
|
291 | 301 |
if __name__ == "__main__": |
292 | 302 |
testutils.GanetiTestProgram() |
Also available in: Unified diff