Created
May 29, 2020 08:32
-
-
Save kevit/a7899817db74f1be65e4235d40f99d67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--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