Beispiel #1
0
    def test_items_limit_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config()
        config.writer_options['options']['items_limit'] = 10

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
    def test_items_limit_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config()
        config.writer_options['options']['items_limit'] = 10

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
Beispiel #3
0
    def test_custom_grouper_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config(grouper={
            'name': 'whatever.Grouper',
        })

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
    def test_custom_grouper_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config(grouper={
            'name': 'whatever.Grouper',
        })

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
    def test_custom_filter_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config(filter={
            'name': 'exporters.filters.PythonexpFilter',
            'options': {'python_expression': 'None'}
        })

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
Beispiel #6
0
    def test_custom_filter_should_not_meet_conditions(self):
        # given:
        config = create_stream_bypass_simple_config(
            filter={
                'name': 'exporters.filters.PythonexpFilter',
                'options': {
                    'python_expression': 'None'
                }
            })

        # when:

        # then:
        self.assertFalse(StreamBypass.meets_conditions(config))
Beispiel #7
0
 def test_should_meet_conditions(self):
     config = create_stream_bypass_simple_config()
     # shouldn't raise any exception
     StreamBypass.meets_conditions(config)
 def test_should_meet_conditions(self):
     config = create_stream_bypass_simple_config()
     # shouldn't raise any exception
     StreamBypass.meets_conditions(config)