Skip to content

Instantly share code, notes, and snippets.

@kevit

kevit/pytest

Created May 29, 2020
Embed
What would you like to do?
--tc-file=TESTCONFIG
myapp:
servers:
main_server: 10.1.1.1
secondary_server: 10.1.1.2
from pytest_testconfig import config
def test_foo():
main_server = config['myapp']['servers']['main_server']
def test_home():
"GET request to url returns a 200"
url = 'https://monitorial.com/'
resp = requests.get(url)
assert resp.status_code == 200
def test_cert_hostname(host,hostname)
cert = ssl.get_server_certificate(addr=(host, 443))
assert ssl.match_hostname(cert, hostname)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment