def testValidate_003(self): """ Test validate on a non-empty amazons3 section with no values filled in. """ config = LocalConfig() config.amazons3 = AmazonS3Config(None) self.assertRaises(ValueError, config.validate)
def testValidate_005(self): """ Test validate on a non-empty amazons3 section with valid values filled in. """ config = LocalConfig() config.amazons3 = AmazonS3Config(True, "bucket") config.validate()
def testValidate_001(self): """ Test validate on a None amazons3 section. """ config = LocalConfig() config.amazons3 = None self.assertRaises(ValueError, config.validate)
def testValidate_002(self): """ Test validate on an empty amazons3 section. """ config = LocalConfig() config.amazons3 = AmazonS3Config() self.assertRaises(ValueError, config.validate)
def testConstructor_005(self): """ Test assignment of amazons3 attribute, valid value. """ config = LocalConfig() config.amazons3 = AmazonS3Config() self.assertEqual(AmazonS3Config(), config.amazons3)
def testConstructor_004(self): """ Test assignment of amazons3 attribute, None value. """ config = LocalConfig() config.amazons3 = None self.assertEqual(None, config.amazons3)
def testAddConfig_002(self): """ Test with values set. """ amazons3 = AmazonS3Config(True, "bucket", "encrypt", 1, 2) config = LocalConfig() config.amazons3 = amazons3 self.validateAddConfig(config)
def testAddConfig_001(self): """ Test with empty config document. """ amazons3 = AmazonS3Config() config = LocalConfig() config.amazons3 = amazons3 self.validateAddConfig(config)
def testComparison_004(self): """ Test comparison of two differing objects, s3Bucket differs. """ config1 = LocalConfig() config1.amazons3 = AmazonS3Config(True, "bucket1", "encrypt", 1, 2) config2 = LocalConfig() config2.amazons3 = AmazonS3Config(True, "bucket2", "encrypt", 1, 2) self.assertNotEqual(config1, config2) self.assertTrue(not config1 == config2) self.assertTrue(config1 < config2) self.assertTrue(config1 <= config2) self.assertTrue(not config1 > config2) self.assertTrue(not config1 >= config2) self.assertTrue(config1 != config2)
def testComparison_002(self): """ Test comparison of two identical objects, all attributes non-None. """ config1 = LocalConfig() config1.amazons3 = AmazonS3Config() config2 = LocalConfig() config2.amazons3 = AmazonS3Config() self.assertEqual(config1, config2) self.assertTrue(config1 == config2) self.assertTrue(not config1 < config2) self.assertTrue(config1 <= config2) self.assertTrue(not config1 > config2) self.assertTrue(config1 >= config2) self.assertTrue(not config1 != config2)
def testComparison_003(self): """ Test comparison of two differing objects, amazons3 differs (one None). """ config1 = LocalConfig() config2 = LocalConfig() config2.amazons3 = AmazonS3Config() self.assertNotEqual(config1, config2) self.assertTrue(not config1 == config2) self.assertTrue(config1 < config2) self.assertTrue(config1 <= config2) self.assertTrue(not config1 > config2) self.assertTrue(not config1 >= config2) self.assertTrue(config1 != config2)