def test_verifyBoolean_AllValuesThatShouldRaiseException(self): badValues = ("true", "false", "", "2", "crap") for b in badValues: try: MythSettings.verifyBoolean(b, "blah") self.fail("should have throws SettingsException") except SettingsException, se: log.debug("PASS: %s %s" % (b, se))
def test_verifyBoolean_AllValuesThatShouldRaiseException(self): badValues = ('true', 'false', '', '2', 'crap') for b in badValues: try: MythSettings.verifyBoolean(b, 'blah') self.fail('should have throws SettingsException') except SettingsException, se: log.debug('PASS: %s %s' % (b, se))
def test_verifyBoolean_AllValuesThatShouldNotRaiseException(self): MythSettings.verifyBoolean("True", "blah") MythSettings.verifyBoolean("False", "blah") MythSettings.verifyBoolean("1", "blah") MythSettings.verifyBoolean("0", "blah")
def test_verifyBoolean_AllValuesThatShouldNotRaiseException(self): MythSettings.verifyBoolean('True', 'blah') MythSettings.verifyBoolean('False', 'blah') MythSettings.verifyBoolean('1', 'blah') MythSettings.verifyBoolean('0', 'blah')