import apiritif from apiritif import http def testRandomDogImage(): with apiritif.transaction('Random'): response = http.get("https://dog.ceo/api/breeds/image/random") response.assert_ok() response.assert_header_value('Content-Type', 'application/json') response.assert_has_header('X-Cache') response.assert_in_body('"success"') response.assert_jsonpath('status', 'success')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter