File: TestRuleProperties.py

package info (click to toggle)
ansible-lint 4.1.0%2Bdfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,096 kB
  • sloc: python: 3,373; sh: 4; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import unittest

from ansiblelint import RulesCollection, default_rulesdir


class TestAlwaysRun(unittest.TestCase):
    collection = RulesCollection()

    def setUp(self):
        self.collection.extend(
            RulesCollection.create_from_directory(default_rulesdir)
        )

    def test_serverity_valid(self):
        valid_severity_values = [
            'VERY_HIGH',
            'HIGH',
            'MEDIUM',
            'LOW',
            'VERY_LOW',
            'INFO',
        ]
        for rule in self.collection:
            self.assertIn(rule.severity, valid_severity_values)