First commit
This commit is contained in:
3
tests/libros/test_ejemplo.py
Normal file
3
tests/libros/test_ejemplo.py
Normal file
@ -0,0 +1,3 @@
|
||||
# Las funciones deben empezar por "test_"
|
||||
def test_titulo():
|
||||
assert "canción de hielo y fuego" != "juego de tronos"
|
9
tests/libros/test_ping.py
Normal file
9
tests/libros/test_ping.py
Normal file
@ -0,0 +1,9 @@
|
||||
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!"
|
Reference in New Issue
Block a user