feat: botao de gerar chave de reativacao por linha na lista de clientes
This commit is contained in:
@@ -187,6 +187,23 @@ def test_listar_clientes_inclui_csrf_token_no_contexto(monkeypatch):
|
||||
assert 'const CSRF_TOKEN = "";' in resposta.text
|
||||
|
||||
|
||||
def test_listar_clientes_tem_botao_de_gerar_chave_por_linha(monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
router_clientes.db_clientes,
|
||||
"listar_clientes",
|
||||
lambda busca=None, limite=100, offset=0, ordenar_por="razao", direcao="asc": [
|
||||
{"ID": 1, "CODIGO": "000042", "RAZAO": "Cliente Um", "FANTASIA": "Um", "CNPJ": "11222333000181"}
|
||||
],
|
||||
)
|
||||
monkeypatch.setattr(router_clientes.db_clientes, "contar_clientes", lambda busca=None, ordenar_por="razao": 1)
|
||||
|
||||
resposta = client.get("/clientes")
|
||||
assert resposta.status_code == 200
|
||||
assert 'data-codigo="000042"' in resposta.text
|
||||
assert "gerarChaveReativacao(this)" in resposta.text
|
||||
assert "/gerador-chave/gerar" in resposta.text
|
||||
|
||||
|
||||
def test_listar_clientes_pagina_com_controles_de_paginacao(monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
router_clientes.db_clientes,
|
||||
|
||||
Reference in New Issue
Block a user