Skip to content

Instantly share code, notes, and snippets.

@kevit
Created May 29, 2020 08:32
Show Gist options
  • Save kevit/a7899817db74f1be65e4235d40f99d67 to your computer and use it in GitHub Desktop.
Save kevit/a7899817db74f1be65e4235d40f99d67 to your computer and use it in GitHub Desktop.
--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