Created
April 29, 2019 19:53
-
-
Save rnrbarbosa/d3e9e3ff74df8bbf44d32b78f4182dea to your computer and use it in GitHub Desktop.
pytest parameterized
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
import pytest | |
import requests | |
domains = ['cnn.com','google.com'] | |
@pytest.mark.parametrize("domain",domains) | |
def test_domains(domain): | |
url = "https://" + domain | |
r = requests.get(url) | |
assert r.status_code == 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment