From 06fc9e7a3c4b16bb618143dcd576ff82b0651d2d Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Tue, 19 Oct 2021 12:45:51 -0300 Subject: [PATCH] Simplificar teste --- api/tests.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/api/tests.py b/api/tests.py index fc03a00..2c37b1d 100755 --- a/api/tests.py +++ b/api/tests.py @@ -304,14 +304,7 @@ class MainTestCase(TestCase): self.assert_401(response) def test_delete_pokemon_not_found(self): - login = { - "email": "joaooliveira@hotmail.com", - "password": "senha", - } - auth = self.client.post("/trainer/authenticate", json=login, follow_redirects=True) - self.assert_200(auth) - token = auth.get_json()["token"] - response = self.client.delete("/trainer/2/pokemon/1000", headers={"Authorization":token}, follow_redirects=True) + response = self.client.delete("/trainer/2/pokemon/1000", headers={"Authorization":self.token_joao}, follow_redirects=True) self.assert_404(response) def test_delete_pokemon(self):