- Important, but is not easy to achieve
- So prefer unit tests
- Else; No need to keep to Delphi here
import requests
import os
from approvaltests.approvals import verify_as_json
api_url = os.environ['PUBLIC_URL']
class TestForSmoke:
def get_books(self):
r = requests.get(f"{api_url}/books/")
return r.json()
def test_books(self):
verify_as_json(self.get_books())
verify_as_xml
possible for html/xmlverify
for text