예제 #1
0
def test_nome_usuario_logado_disponivel(resp_home_logado, usuario_logado):
    assert_contains(resp_home_logado, usuario_logado.first_name)
예제 #2
0
def test_link_logout_disponivel(resp_home_logado):
    assert_contains(resp_home_logado, reverse('logout'))
예제 #3
0
def test_link_disponivel(resp_home):
    assert_contains(resp_home, reverse('login'))
예제 #4
0
def test_botao_sair_disponivel(resp_home_logado):
    assert_contains(resp_home_logado, 'Sair')
예제 #5
0
def test_dados(resp, produto):
    assert_contains(resp, produto.nome)
    assert_contains(resp, produto.descricao)
예제 #6
0
def test_botao_entrar_disponivel(resp_home):
    assert_contains(resp_home, 'Entrar')
예제 #7
0
def test_link_deletar(resp, produto):
    for p in produto:
        assert_contains(resp, reverse('delete_produto', kwargs={'pk': p.pk}))
예제 #8
0
def test_link_cadastrar(resp, produto):
    assert_contains(resp, reverse('create_produto'))
예제 #9
0
def test_dados(resp, produto):
    for p in produto:
        assert_contains(resp, p.nome)
        assert_contains(resp, p.descricao)
예제 #10
0
def test_link_alterar(resp, produto):
    for p in produto:
        assert_contains(resp, reverse('edit_produto', kwargs={'pk': p.pk}))
예제 #11
0
def test_portifolio_link(resp):
    assert_contains(resp, 'href="https://ravellys.github.io"')
예제 #12
0
def test_cadastro_clientes_link(resp):
    assert_contains(resp, f'href="{reverse("create_produto")}"')
예제 #13
0
def test_lista_clientes_link(resp):
    assert_contains(resp, f'href="{reverse("list_produto")}"')
예제 #14
0
def test_home_link(resp):
    assert_contains(resp, f'href="{reverse("base:home")}"')
예제 #15
0
def test_title(resp):
    assert_contains(resp, '<title>Home</title>')