Simplificar teste

This commit is contained in:
Augusto Gunsch 2021-10-19 12:45:51 -03:00
parent 53e8dc40b4
commit 06fc9e7a3c
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
1 changed files with 1 additions and 8 deletions

View File

@ -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):