File: test_xinetd.py

package info (click to toggle)
rpmlint 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,308 kB
  • sloc: python: 20,622; ansic: 2,511; xml: 1,272; makefile: 17; sh: 4
file content (22 lines) | stat: -rw-r--r-- 613 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from mockdata.mock_xinetd import RequireXinetd
import pytest
from rpmlint.checks.XinetdDepCheck import XinetdDepCheck
from rpmlint.filter import Filter

from Testing import CONFIG


@pytest.fixture(scope='function', autouse=True)
def xinetdcheck():
    CONFIG.info = True
    output = Filter(CONFIG)
    test = XinetdDepCheck(CONFIG, output)
    return output, test


@pytest.mark.parametrize('package', [RequireXinetd])
def test_xinetd(package, xinetdcheck):
    output, test = xinetdcheck
    test.check(package)
    out = output.print_results(output.results)
    assert 'E: obsolete-xinetd-requirement' in out