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

[IMP] l10n_br_cnpj_search: refactors the test mocks #3438

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

Tiago370
Copy link
Contributor

@Tiago370 Tiago370 commented Oct 14, 2024

Pessoal, estou trabalhando nos testes do PR #3289 e senti uma necessidade de refatorar os mocks do l10n_br_cnpj_search.
O que esse PR faz é tirar os dicionários de mock dos testes e colocar no common.
O que me motivou fazer isso é:

  • Facilitar a reutilização desses mocks em outro módulo (como por exemplo o l10n_br_crm_cnpj_search, que estou trabalhando)
  • Possibilitar futuras refatorações (que posso fazer inclusive nesse PR, caso vejam necessidade), aproveitando a estrutura de dicionário pra refatorar os próprios dicionários. Ao invés de termos vários dicionários grandes e quase idênticos com apenas alguns campos diferentes, teríamos um dicionário e os demais seriam cópias com campos de interesse adicionados/alterados.

Bom, isso é o que eu consegui pensar até agora, estou aberto a sugestões.
(marquei todos que interagiram no PR #3428)
@mileo , @rvalyi , @kaynnan , @CristianoMafraJunior , @antoniospneto

@Tiago370 Tiago370 changed the title [IMP] l10n_br_cnpj_search: solves cnpj duplication problem in tests [IMP] l10n_br_cnpj_search: refactors the test mocks Oct 14, 2024
@Tiago370 Tiago370 marked this pull request as ready for review October 14, 2024 12:35
Copy link
Contributor

@antoniospneto antoniospneto left a comment

Choose a reason for hiding this comment

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

LGTM

@mileo
Copy link
Member

mileo commented Oct 14, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-3438-by-mileo-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit afcfcf3 into OCA:16.0 Oct 14, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at dcaf65d. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants