Skip to content
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
2 changes: 1 addition & 1 deletion fintoc/managers/v2/account_numbers_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class AccountNumbersManager(ManagerMixin):
"""Represents an account numbers manager."""

resource = "account_number"
methods = ["list", "get", "update", "create"]
methods = ["list", "get", "update", "create", "delete"]
8 changes: 8 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,14 @@ def test_v2_account_number_update(self):
assert account_number.url == f"v2/account_numbers/{account_number_id}"
assert account_number.json.metadata.test_key == metadata["test_key"]

def test_v2_account_number_delete(self):
"""Test deleting an account number using v2 API."""
account_number_id = "acno_Kasf91034gj1AD"

result = self.fintoc.v2.account_numbers.delete(account_number_id)

assert result == account_number_id
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait. el delete devuelve el id?
tb veo que los otros tests assertean el método y la url a la que se pega. taría bueno añadirlo en esta pr y la otra que aprobé

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

les estuve dando una vuelta y por na naturaleza de como funciona el metodo delete en sdk no se testea el tema de la url y metodo en todo el repo. Encontré una forma de hacerlo pero rompe la concistencia con todos los tests de delete entonces nose si me convence

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lo dejaría cm está en los otros.
y no es raro que te esté retornando el acc num id si el result en teoría es el objeto completo según lo que hicistre tu?
o tb son cositas del sdk

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cositas del sdk, para los metodos delete asume que no hay un response y retorna el mismo id que se le pasa al momento de llamar al metodo


def test_v2_account_verification_list(self):
"""Test getting all account verifications using v2 API."""
account_verifications = list(self.fintoc.v2.account_verifications.list())
Expand Down
Loading