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.
Agrego el test unitario para validar el telefono del cliente.
- Loading branch information
1 parent
9e222df
commit e8e5827
Showing
1 changed file
with
10 additions
and
0 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 |
---|---|---|
|
@@ -259,6 +259,16 @@ def test_invalid_email_not_ending_with_com(self): | |
|
||
self.assertIn("El email debe tener un formato válido y ser de la forma [email protected]", errors.values()) | ||
|
||
def test_phone_number_without_54(self): | ||
client_data = { | ||
"name": "Juan Sebastian Veron", | ||
"phone": "2245556789", | ||
"city": "La Plata", | ||
"email": "[email protected]", | ||
} | ||
errors = validate_client(client_data) | ||
self.assertIn("phone", errors) | ||
self.assertEqual(errors["phone"], "El telefono debe comenzar con 54") | ||
|
||
class MedicineModelTest(TestCase): | ||
""" | ||
|