diff --git a/testinfra/test_paste.py b/testinfra/test_paste.py index 2e175feb91..b46e1446da 100644 --- a/testinfra/test_paste.py +++ b/testinfra/test_paste.py @@ -59,3 +59,11 @@ def test_paste_screenshots(host): ) take_screenshots(host, shots) + + # Selenium doesn't handle screenshots of pngs, but that is fine we can + # just download and save the png directly into the screenshots dir. + # We disable ssl verification because we're connecting via bridge and + # it doesn't trust the cert. + r = requests.get('https://paste99.opendev.org/_captcha.png', verify=False) + with open('/var/log/screenshots/paste-captcha.png', 'wb') as f: + f.write(r.content)