Revision 02cff8aa test/py/qa.qa_config_unittest.py
b/test/py/qa.qa_config_unittest.py | ||
---|---|---|
308 | 308 |
self.config.SetExclusiveStorage(value) |
309 | 309 |
self.assertEqual(self.config.GetExclusiveStorage(), bool(value)) |
310 | 310 |
|
311 |
def testIsTemplateSupported(self): |
|
312 |
enabled_dts = self.config.GetEnabledDiskTemplates() |
|
313 |
for e_s in [False, True]: |
|
314 |
self.config.SetExclusiveStorage(e_s) |
|
311 | 315 |
for template in constants.DISK_TEMPLATES: |
312 |
if value and template not in constants.DTS_EXCL_STORAGE: |
|
316 |
if (template not in enabled_dts or |
|
317 |
e_s and template not in constants.DTS_EXCL_STORAGE): |
|
313 | 318 |
self.assertFalse(self.config.IsTemplateSupported(template)) |
314 | 319 |
else: |
315 | 320 |
self.assertTrue(self.config.IsTemplateSupported(template)) |
Also available in: Unified diff