def test_zero(self): config = PluginCallConfiguration({}, {importer_constants.KEY_MAX_DOWNLOADS: 0}) try: importer_config.validate_max_downloads(config) self.fail() except ValueError, e: self.assertTrue('0' in e[0])
def test_optional(self): config = PluginCallConfiguration({}, {}) importer_config.validate_max_downloads(config)
def test_validate_str(self): config = PluginCallConfiguration( {}, {importer_constants.KEY_MAX_DOWNLOADS: '2'}) importer_config.validate_max_downloads(config)
def test_validate_str(self): config = PluginCallConfiguration({}, {importer_constants.KEY_MAX_DOWNLOADS: '2'}) importer_config.validate_max_downloads(config)