<commit_before>import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    '.molecule/ansible_inventory').get_hosts('sqlite')


def test_package(Package):
    p = Package('pdns-backend-sqlite3')
    assert p.is_installed


def test_database_exists(File):
    f = File('/var/lib/powerdns/pdns.db')

    assert f.exists
    assert f.user == 'pdns'
    assert f.group == 'pdns'<commit_msg>Fix sqlite test on CentOS<commit_after>import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    '.molecule/ansible_inventory').get_hosts('sqlite')

debian_os = ['debian', 'ubuntu']
rhel_os = ['redhat', 'centos']


def test_package(Package, SystemInfo):
    p = None
    if SystemInfo.distribution in debian_os:
        p = Package('pdns-backend-sqlite3')
    if SystemInfo.distribution in rhel_os:
        p = Package('pdns-backend-sqlite')

    assert p.is_installed


def test_database_exists(File):
    f = File('/var/lib/powerdns/pdns.db')

    assert f.exists
    assert f.user == 'pdns'
    assert f.group == 'pdns'
{'fraction_non_alphanumeric': 0.12590579710144928, 'fraction_numerical': 0.0018115942028985507, 'mean_word_length': 4.068807339449541, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4971122', 'n_tokens_mistral': 406, 'n_tokens_neox': 374, 'n_words': 68}