Apkawa / pytest-django-liveserver-ssl

Extends pytest-django live_server fixture for add ssl feature

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation Status

ci Codecov

PyPi PyPi Python versions License

pytest-django-liveserver-ssl

Add live_server_ssl fixture for pytest-django.

Installation

pip install pytest-django-liveserver-ssl

or from git

pip install -e git+https://githib.com/Apkawa/pytest-django-liveserver-ssl.git@master#egg=pytest-django-liveserver-ssl

Usage

import requests


def test_live_server_connection(live_server_ssl):
    assert live_server_ssl.remote_url.startswith("https://localhost:")
    assert live_server_ssl.url.startswith("http://0.0.0.0:")

    response = requests.get(live_server_ssl.remote_url, verify=False)
    assert response.text == "OK"

About

Extends pytest-django live_server fixture for add ssl feature

License:MIT License


Languages

Language:Python 100.0%