File diff 9e06b8437eeb → cde12eec8256
roles/wsgi_website/molecule/default/tests/test_default.py
Show inline comments
 
@@ -277,31 +277,32 @@ def test_python_virtualenv_wrapper_script(host, wrapper_script, expected_owner,
 
        "packaging==23.2",
 
    ]),
 
    ('admin-parameters-optional_local', '/var/www/parameters-optional.local/virtualenv/bin/pip', [
 
        "Pygments==2.2.0",
 
        "dnspython==1.15.0",
 
        "docopt==0.6.2",
 
        "appdirs==1.4.4",
 
        "dnspython==2.6.1",
 
        "gunicorn==21.1.0",
 
        "jedi==0.13.1",
 
        "jedi==0.19.1",
 
        "packaging==23.2",
 
        "parso==0.3.1",
 
        "prompt-toolkit==1.0.15",
 
        "ptpython==0.41",
 
        "six==1.11.0",
 
        "wcwidth==0.1.7",
 
        "parso==0.8.3",
 
        "prompt-toolkit==3.0.43",
 
        "ptpython==3.0.26",
 
        "pygments==2.17.2",
 
        "wcwidth==0.2.13",
 
    ]),
 
    ('admin-parameters-paste-req', '/var/www/parameters-paste-req/virtualenv/bin/pip', [
 
        "Flask==0.12.2",
 
        "Jinja2==2.9.6",
 
        "MarkupSafe==1.0",
 
        "Paste==2.0.3",
 
        "PasteDeploy==1.5.2",
 
        "PasteScript==2.0.2",
 
        "Werkzeug==0.12.2",
 
        "click==6.7",
 
        "Flask==3.0.2",
 
        "Jinja2==3.1.3",
 
        "MarkupSafe==2.1.5",
 
        "Paste==3.7.1",
 
        "PasteDeploy==3.1.0",
 
        "Werkzeug==3.0.1",
 
        "blinker==1.7.0",
 
        "click==8.1.7",
 
        "gunicorn==21.1.0",
 
        "itsdangerous==0.24",
 
        "importlib-metadata==7.0.1",
 
        "itsdangerous==2.1.2",
 
        "packaging==23.2",
 
        "six==1.10.0",
 
        "six==1.16.0",
 
        "zipp==3.17.0",
 
    ]),
 
])
 
def test_virtualenv_packages(host, admin_user, pip_path, expected_packages):
 
@@ -495,17 +496,19 @@ def test_website_enabled(host, config_file, expected_content):
 
    assert config.linked_to == expected_content
 

	
 

	
 
@pytest.mark.parametrize("python_path, expected_version", [
 
    ("/var/www/parameters-mandatory/virtualenv/bin/python", "Python 3.9.2"),
 
    ("/var/www/parameters-optional.local/virtualenv/bin/python", "Python 3.9.2"),
 
    ("/var/www/parameters-paste-req/virtualenv/bin/python", "Python 3.9.2"),
 
@pytest.mark.parametrize("python_path", [
 
    ("/var/www/parameters-mandatory/virtualenv/bin/python"),
 
    ("/var/www/parameters-optional.local/virtualenv/bin/python"),
 
    ("/var/www/parameters-paste-req/virtualenv/bin/python"),
 
])
 
def test_python_version_in_virtualenv(host, python_path, expected_version):
 
def test_python_version_in_virtualenv(host, python_info, python_path,):
 
    """
 
    Tests if correct Python version is used inside of virtual
 
    environment.
 
    """
 

	
 
    expected_version = "Python %s" % python_info.python_version
 

	
 
    with host.sudo():
 

	
 
        python_version = host.run(python_path + " --version")