示例#1
0
def test_get_rule_options_missing_options():
    entry = ('all', [], tuple_rulesets.ALL_HOSTS
             )  # type: Tuple[str, List[str], List[str]]
    assert tuple_rulesets.get_rule_options(entry) == (entry, {})
示例#2
0
def test_get_rule_options_regular_rule():
    options = {'description': u'Put all hosts into the contact group "all"'}
    entry = ('all', [], tuple_rulesets.ALL_HOSTS, options
             )  # type: Tuple[str, List[str], List[str], Dict]
    assert tuple_rulesets.get_rule_options(entry) == (entry[:-1], options)
示例#3
0
def test_get_rule_options_empty_options():
    options = {}  # type: Dict
    entry = ('all', [], tuple_rulesets.ALL_HOSTS, options
             )  # type: Tuple[str, List[str], List[str], Dict]
    assert tuple_rulesets.get_rule_options(entry) == (entry[:-1], options)
示例#4
0
def test_get_rule_options_missing_options():
    entry = ('all', [], tuple_rulesets.ALL_HOSTS)
    assert tuple_rulesets.get_rule_options(entry) == (entry, {})
示例#5
0
def test_get_rule_options_empty_options():
    options = {}
    entry = ('all', [], tuple_rulesets.ALL_HOSTS, options)
    assert tuple_rulesets.get_rule_options(entry) == (entry[:-1], options)
示例#6
0
def test_get_rule_options_empty_options():
    options: Dict = {}
    entry: Tuple[str, List[str], List[str],
                 Dict] = ('all', [], tuple_rulesets.ALL_HOSTS, options)
    assert tuple_rulesets.get_rule_options(entry) == (entry[:-1], options)
示例#7
0
def test_get_rule_options_missing_options():
    entry: Tuple[str, List[str],
                 List[str]] = ("all", [], tuple_rulesets.ALL_HOSTS)
    assert tuple_rulesets.get_rule_options(entry) == (entry, {})
示例#8
0
def test_get_rule_options_regular_rule():
    options = {"description": 'Put all hosts into the contact group "all"'}
    entry: Tuple[str, List[str], List[str],
                 Dict] = ("all", [], tuple_rulesets.ALL_HOSTS, options)
    assert tuple_rulesets.get_rule_options(entry) == (entry[:-1], options)