def test_meet_supported_options(self): exporter_options = ExporterConfig( valid_config_with_updates({ 'reader': {'name': 'exporters.readers.s3_reader.S3Reader', 'options': {'prefix': 'mock', 'bucket': 'mock'}}, 'writer': {'name': 'exporters.writers.s3_writer.S3Writer', 'options': {'bucket': 'mock', 'filebase': 'mock'}}, 'exporter_options': {'formatter': JSON_FORMATTER} }) ) S3Bypass.meets_conditions(exporter_options)
def test_items_limit_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config() config.writer_options['options']['items_limit'] = 10 # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_items_limit_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config() config.writer_options['options']['items_limit'] = 10 # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_custom_grouper_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config(grouper={ 'name': 'whatever.Grouper', }) # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_custom_grouper_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config(grouper={ 'name': 'whatever.Grouper', }) # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_custom_filter_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config(filter={ 'name': 'exporters.filters.PythonexpFilter', 'options': {'python_expression': 'None'} }) # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_meet_supported_options(self): exporter_options = ExporterConfig( valid_config_with_updates({ 'reader': { 'name': 'exporters.readers.s3_reader.S3Reader', 'options': { 'prefix': 'mock', 'bucket': 'mock' } }, 'writer': { 'name': 'exporters.writers.s3_writer.S3Writer', 'options': { 'bucket': 'mock', 'filebase': 'mock' } }, 'exporter_options': { 'formatter': JSON_FORMATTER } })) S3Bypass.meets_conditions(exporter_options)
def test_custom_filter_should_not_meet_conditions(self): # given: config = create_s3_bypass_simple_config( filter={ 'name': 'exporters.filters.PythonexpFilter', 'options': { 'python_expression': 'None' } }) # when: # then: self.assertFalse(S3Bypass.meets_conditions(config))
def test_should_meet_conditions(self): config = create_s3_bypass_simple_config() # shouldn't raise any exception S3Bypass.meets_conditions(config)
def test_should_meet_conditions(self): config = create_s3_bypass_simple_config() # shouldn't raise any exception S3Bypass.meets_conditions(config)