example-of-crud-in-django-w.../tests/test_ping.py
Andros Fenollosa 2e3f2029d3 Add books
2021-07-12 07:01:26 +02:00

9 lines
244 B
Python

import json
from django.urls import reverse
def test_ping(client):
url = reverse("ping")
response = client.get(url)
content = json.loads(response.content)
assert response.status_code == 200
assert content["ping"] == "pong!"