def test_public(resp, module: Module): assert_contains(resp, module.public)
def test_modules_link(resp, modules): for module in modules: assert_contains(resp, module.get_absolute_url())
def test_description(resp, module: Module): assert_contains(resp, module.description)
def test_logout_link_unavailable(resp_home_with_logged_user): assert_contains(resp_home_with_logged_user, reverse('logout'))
def test_vimeo(resp, classs: Classs): assert_contains(resp, f'src="https://player.vimeo.com/video/{classs.vimeo_id}"')
def test_login_button_available(resp_home): assert_contains(resp_home, 'Enter')
def test_logout_button_available(resp_home_with_logged_user): assert_contains(resp_home_with_logged_user, 'Logout')
def test_classes_urls(resp, classes: List[Classs]): for classs in classes: assert_contains(resp, classs.get_absolute_url())
def test_title(resp): assert_contains(resp, '<title>Study of Django – Home</title>')
def test_description(resp, modules: List[Module]): for module in modules: assert_contains(resp, module.description)
def test_public(resp, modules: List[Module]): for module in modules: assert_contains(resp, module.public)
def test_title(resp, modules: List[Module]): for module in modules: assert_contains(resp, module.title)
def test_link_video(resp, videos): for video in videos: video_link = reverse('appetizers:video', args=(video.slug, )) assert_contains(resp, f'href="{video_link}"')
def test_title_video(resp, videos): for video in videos: assert_contains(resp, video.title)
def test_classes_titles(resp, classes): for classs in classes: assert_contains(resp, classs.title)
def test_home_link(resp): assert_contains(resp, f'href="{reverse("base:home")}">Study of Django</a>')
def test_classes_links(resp, classes): for classs in classes: assert_contains(resp, classs.get_absolute_url())
def test_email_link(resp): assert_contains(resp, 'href="mailto:[email protected]"')
def test_login_link_available(resp_home): assert_contains(resp_home, reverse('login'))
def test_title_video(resp, video): assert_contains(resp, video.title)
def test_name_logged_user_available(resp_home_with_logged_user, logged_user): assert_contains(resp_home_with_logged_user, logged_user.first_name)
def test_content_video(resp, video): assert_contains( resp, f'<iframe src="https://player.vimeo.com/video/{video.vimeo_id}"')
def test_title(resp, classs: Classs): assert_contains(resp, classs.title)
def test_title(resp, module: Module): assert_contains(resp, module.title)
def test_modulo_breadcrumb(resp, module: Module): assert_contains( resp, f'<li class="breadcrumb-item"><a href="{module.get_absolute_url()}">{module.title}</a></li>' )
def test_modules_titles(resp, modules): for module in modules: assert_contains(resp, module.title)