-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'maintenance' into develop
- Loading branch information
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
intelmq/tests/bots/experts/filter/test_empty_string_parameters.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-FileCopyrightText: 2021 Sebastian Wagner | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
# -*- coding: utf-8 -*- | ||
|
||
import unittest | ||
|
||
import intelmq.lib.test as test | ||
from intelmq.bots.experts.filter.expert import FilterExpertBot | ||
from .test_extra import EXAMPLE_INPUT | ||
|
||
|
||
class TestFilterExpertBot(test.BotTestCase, unittest.TestCase): | ||
""" | ||
A TestCase for FilterExpertBot. | ||
""" | ||
|
||
@classmethod | ||
def set_bot(cls): | ||
cls.bot_reference = FilterExpertBot | ||
cls.input_message = EXAMPLE_INPUT | ||
cls.sysconfig = {'filter_key': 'source.asn', | ||
'filter_value': '', | ||
'filter_action': 'drop', | ||
'not_before': '', | ||
'not_after': ''} | ||
|
||
def test_empty_string_parameters(self): | ||
self.run_bot() | ||
# we actually only need to check if the bot does not fail | ||
self.assertMessageEqual(0, EXAMPLE_INPUT) | ||
|
||
|
||
if __name__ == '__main__': # pragma: no cover | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters