Skip to content

Commit

Permalink
Actualizo test de integracion
Browse files Browse the repository at this point in the history
  • Loading branch information
CandelAbregu committed Jun 5, 2024
1 parent 4a6adaf commit 6e28ee4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/tests_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,20 @@ def test_edit_user_with_valid_data_test(self):
data={
"id": client.id,
"name": "Juan Sebastian Veron",
"phone": "221456789",
"phone": "54221456789",
"email": "[email protected]",
"city": "Berisso",
},
)

# redirect after post
self.assertEqual(response.status_code, 200)
self.assertEqual(response.status_code, 302)

editedClient = Client.objects.get(pk=client.id)

self.assertEqual(editedClient.name, "Juan Sebastian Veron")
self.assertEqual(editedClient.email, "[email protected]")
self.assertEqual(editedClient.phone, "221456789")
self.assertEqual(editedClient.phone, "54221456789")
self.assertEqual(editedClient.city, "Berisso")

def test_edit_user_with_invalid_data_test_city(self):
Expand All @@ -161,7 +161,7 @@ def test_edit_user_with_invalid_data_test_city(self):
client = Client.objects.create(
name="Guido Carrillo",
city="La Plata",
phone="221456789",
phone="54221456789",
email="[email protected]",
)

Expand All @@ -171,7 +171,7 @@ def test_edit_user_with_invalid_data_test_city(self):
data={
"id": client.id,
"name": "Juan Sebastian Veron",
"phone": "221456789",
"phone": "54221456789",
"city": "Rosario",
"email": "[email protected]",
},
Expand All @@ -189,8 +189,8 @@ def test_validation_invalid_name_client(self):
reverse("clients_form"),
data={
"name": "Juan Sebastian Veron 11",
"phone": "221555232",
"address": "13 y 44",
"phone": "54221555232",
"city": "La Plata",
"email": "[email protected]",
},
)
Expand All @@ -203,7 +203,7 @@ def test_user_cant_edit_client_with_empty_name(self):
"""
client=Client.objects.create(
name="Juan Sebastian Veron",
phone="221555232",
phone="54221555232",
city="La Plata",
email="[email protected]",
)
Expand All @@ -227,7 +227,7 @@ def test_user_cant_edit_client_with_incorrect_name(self):
"""
client=Client.objects.create(
name="Juan Sebastian Veron",
phone="221555232",
phone="54221555232",
city="La Plata",
email="[email protected]",
)
Expand Down

0 comments on commit 6e28ee4

Please sign in to comment.