Beispiel #1
0
 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))
Beispiel #2
0
 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))
Beispiel #3
0
 def test_verifyBoolean_AllValuesThatShouldNotRaiseException(self):
     MythSettings.verifyBoolean("True", "blah")
     MythSettings.verifyBoolean("False", "blah")
     MythSettings.verifyBoolean("1", "blah")
     MythSettings.verifyBoolean("0", "blah")
Beispiel #4
0
 def test_verifyBoolean_AllValuesThatShouldNotRaiseException(self):
     MythSettings.verifyBoolean('True', 'blah')
     MythSettings.verifyBoolean('False', 'blah')
     MythSettings.verifyBoolean('1', 'blah')
     MythSettings.verifyBoolean('0', 'blah')