example-of-crud-in-django-w.../tests/test_ping.py
Andros Fenollosa 204556f495 format
2021-07-13 18:30:31 +02:00

11 lines
246 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!"