def test_validate(self): config_mock = mock.Mock() config_mock.custom_compression_filter = "dummy_compression_filter" config_mock.custom_decompression_filter = "dummy_decompression_filter" compressor = CustomCompressor(config=config_mock, compression="custom") validate = compressor.validate("custom") assert validate is None
def test_validate(self): config_mock = mock.Mock() config_mock.custom_compression_filter = 'dummy_compression_filter' config_mock.custom_decompression_filter = 'dummy_decompression_filter' compressor = CustomCompressor(config=config_mock, compression="custom") validate = compressor.validate('custom') assert validate is None
def test_custom_compressor_creation(self): config_mock = mock.Mock() config_mock.custom_compression_filter = 'dummy_compression_filter' config_mock.custom_decompression_filter = 'dummy_decompression_filter' compressor = CustomCompressor(config=config_mock, compression="custom") assert compressor is not None assert compressor._compress.cmd == ( 'command(){ dummy_compression_filter > "$2" < "$1";}; command') assert compressor._decompress.cmd == ( 'command(){ dummy_decompression_filter > "$2" < "$1";}; command')