Files @ 998aab91d6b4
Branch filter:

Location: majic-ansible-roles/roles/wsgi_website/tests/test_default.py

branko
MAR-33: Implemented tests for the wsgi_website role:

- Updated test playbook to have better coverage of functionality.
- Fixed some additional permission mode issues (leading zero).
- Use expanded syntax for deploying TLS material in order to avoid mangling of
TABs.
- Implemented proper WSGI applications in order to test everything.
- Implemented tests covering mandatory parameters, optional parameters, and the
use of WSGI requirements/Paster.
import testinfra.utils.ansible_runner


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


def test_hosts_file(File):
    f = File('/etc/hosts')

    assert f.exists
    assert f.user == 'root'
    assert f.group == 'root'