def test_contact_content(client, content): response = client.get('/contato/') dj_assert_contains(response, content)
def test_form_action(resp): dj_assert_contains( resp, f'''<form method="post" action="{reverse('moveis:create')}"''')
def test_home(client, content): response = client.get('/') dj_assert_contains(response, content)
def test_image_url(resp, moveis): movel = moveis[0] dj_assert_contains(resp, movel.foto.url)
def test_form_inputs(resp, content): dj_assert_contains(resp, content)
def test_index_content(resp, content): dj_assert_contains(resp, content)
def test_app_link_in_home(client): response = client.get('/') dj_assert_contains(response, reverse('moveis:index'))
def test_forgot_password_link(resp): dj_assert_contains(resp, reverse('password_reset'))
def test_login_action_link(resp): login_path = reverse('login') dj_assert_contains(resp, f'action="{login_path}"')
def test_content(content, resp): dj_assert_contains(resp, content)