feat(tests): adicionar testes para filtro E_CONSULTOR e RankingStore
- Adicionar campo e_consultor nos testes de processar_ranking - Adicionar testes de inserção com E_CONSULTOR no ranking_repository - Criar test_ranking_store.py com testes de filtro ativo/inativo - Garantir que filtros de ativo/inativo só afetam consultores
This commit is contained in:
@@ -182,3 +182,27 @@ def test_contar_para_exportacao_com_filtros(repo, oracle_client):
|
||||
assert params["ativo"] == "S"
|
||||
assert params["selo_0"] == "EVENTO"
|
||||
assert params["selo_1"] == "PROJ"
|
||||
|
||||
|
||||
def test_filtro_ativo_filtra_apenas_consultores(repo, oracle_client):
|
||||
oracle_client.executar_query.return_value = [{"TOTAL": 100}]
|
||||
|
||||
repo.contar_total(filtro_ativo=True)
|
||||
|
||||
call_args = oracle_client.executar_query.call_args
|
||||
query = call_args[0][0]
|
||||
assert "E_CONSULTOR = 'S'" in query
|
||||
assert "ATIVO = :ativo" in query
|
||||
|
||||
|
||||
def test_filtro_ativo_false_filtra_apenas_consultores(repo, oracle_client):
|
||||
oracle_client.executar_query.return_value = [{"TOTAL": 100}]
|
||||
|
||||
repo.contar_total(filtro_ativo=False)
|
||||
|
||||
call_args = oracle_client.executar_query.call_args
|
||||
query = call_args[0][0]
|
||||
assert "E_CONSULTOR = 'S'" in query
|
||||
assert "ATIVO = :ativo" in query
|
||||
params = call_args[0][1]
|
||||
assert params["ativo"] == "N"
|
||||
|
||||
Reference in New Issue
Block a user