Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/d102 #27

Merged
merged 9 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ target-version = "py38"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

select = ["E4", "E7", "E9", "F", "COM812", "D103","I001"]


select = ["E4", "E7", "E9", "F", "COM812", "D102", "D103","I001"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
Expand Down
14 changes: 14 additions & 0 deletions app/migrations/0017_merge_20240604_2359.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 5.0.4 on 2024-06-05 02:59

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('app', '0015_merge_20240603_1125'),
('app', '0016_delete_veterinario'),
]

operations = [
]
14 changes: 14 additions & 0 deletions app/migrations/0019_merge_20240605_0942.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 5.0.4 on 2024-06-05 12:42

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('app', '0017_merge_20240604_2359'),
('app', '0018_remove_client_address_client_city'),
]

operations = [
]
3 changes: 3 additions & 0 deletions app/tests_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def test_edit_user_with_valid_data_test(self):
self.assertEqual(editedClient.city, "Berisso")

def test_edit_user_with_invalid_data_test_city(self):
"""
Se testea la función editar con datos de ciudad invalido.
"""

client = Client.objects.create(
name="Guido Carrillo",
Expand Down
6 changes: 6 additions & 0 deletions app/tests_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def test_can_create_and_get_client(self):
self.assertEqual(clients[0].email, "[email protected]")

def test_can_update_client(self):
"""
Se testea si se puede actualizar los datos del cliente.
"""

Client.save_client(
{
Expand Down Expand Up @@ -75,6 +78,9 @@ def test_update_client_with_error(self):
self.assertEqual(client_updated.phone, "221555232")

def test_update_client_with_email_null(self): #nuevo test verificando que no pueda hacer update con email nulo
"""
Esta funcion testea el cliente acutalizado con un email nulo
"""
Client.save_client(
{
"name": "Juan Sebastian Veron",
Expand Down
3 changes: 3 additions & 0 deletions functional_tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ def test_should_show_error_for_present_birth_date(self):
expect(self.page.get_by_text("La fecha de nacimiento debe ser menor a la fecha actual")).to_be_visible()

def test_should_be_able_to_create_a_new_pet_goto(self):
"""
Verifica si el test me permite crear una nueva masota.
"""
self.page.goto(f"{self.live_server_url}{reverse('pet_form')}")


Expand Down