def test_non_positive_str(self): config = PluginCallConfiguration({}, {importer_constants.KEY_MAX_SPEED: '-42'}) try: importer_config.validate_max_speed(config) self.fail() except ValueError, e: self.assertTrue('parameter <max_speed>' in e[0]) self.assertTrue('-42' in e[0])
def test_optional(self): config = PluginCallConfiguration({}, {}) importer_config.validate_max_speed(config)
def test_str(self): config = PluginCallConfiguration( {}, {importer_constants.KEY_MAX_SPEED: '512'}) importer_config.validate_max_speed(config)
def test_str(self): config = PluginCallConfiguration({}, {importer_constants.KEY_MAX_SPEED: '512'}) importer_config.validate_max_speed(config)