forked from frlp-utn-ingsoft/vetsoft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87cab26
commit 4a6adaf
Showing
1 changed file
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,16 +21,15 @@ def test_can_create_and_get_client(self): | |
Client.save_client( | ||
{ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
}, | ||
) | ||
clients = Client.objects.all() | ||
self.assertEqual(len(clients), 1) | ||
|
||
self.assertEqual(clients[0].name, "Juan Sebastian Veron") | ||
self.assertEqual(clients[0].phone, "221555232") | ||
self.assertEqual(clients[0].phone, "54221555232") | ||
self.assertEqual(clients[0].city, "La Plata") | ||
self.assertEqual(clients[0].email, "[email protected]") | ||
|
||
|
@@ -66,7 +65,7 @@ def test_update_client_with_error(self): | |
Client.save_client( | ||
{ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
}, | ||
|
@@ -78,8 +77,8 @@ def test_update_client_with_error(self): | |
|
||
client.update_client({ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "54221555", | ||
"address": "13 y 44", | ||
"phone": "221555", | ||
"city": "La Plata", | ||
"email": "brujita75hotmail.com"}) | ||
|
||
client_updated = Client.objects.get(pk=1) | ||
|
@@ -94,7 +93,7 @@ def test_validate_client_incorrect_name(self): | |
|
||
data = { | ||
"name": "Juan Sebastian Veron 11", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
} | ||
|
@@ -126,14 +125,14 @@ def test_update_client_with_email_null(self): #nuevo test verificando que no pue | |
Client.save_client( | ||
{ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
}, | ||
) | ||
client = Client.objects.get(pk=1) | ||
|
||
self.assertEqual(client.phone, "221555232") | ||
self.assertEqual(client.phone, "54221555232") | ||
|
||
client.update_client({"email": ""}) | ||
|
||
|
@@ -148,7 +147,7 @@ def test_update_client_with_empty_name(self): | |
Client.save_client( | ||
{ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
}, | ||
|
@@ -169,7 +168,7 @@ def test_update_client_with_incorrect_name(self): | |
Client.save_client( | ||
{ | ||
"name": "Juan Sebastian Veron", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
}, | ||
|
@@ -180,7 +179,7 @@ def test_update_client_with_incorrect_name(self): | |
|
||
client.update_client({ | ||
"name": "Juan Sebastian Veron 11", | ||
"phone": "221555232", | ||
"phone": "54221555232", | ||
"city": "La Plata", | ||
"email": "[email protected]",}) | ||
client_updated = Client.objects.get(pk=1) | ||
|