コード例 #1
0
def test_public(resp, module: Module):
    assert_contains(resp, module.public)
コード例 #2
0
def test_modules_link(resp, modules):
    for module in modules:
        assert_contains(resp, module.get_absolute_url())
コード例 #3
0
def test_description(resp, module: Module):
    assert_contains(resp, module.description)
コード例 #4
0
def test_logout_link_unavailable(resp_home_with_logged_user):
    assert_contains(resp_home_with_logged_user, reverse('logout'))
コード例 #5
0
def test_vimeo(resp, classs: Classs):
    assert_contains(resp,
                    f'src="https://player.vimeo.com/video/{classs.vimeo_id}"')
コード例 #6
0
def test_login_button_available(resp_home):
    assert_contains(resp_home, 'Enter')
コード例 #7
0
def test_logout_button_available(resp_home_with_logged_user):
    assert_contains(resp_home_with_logged_user, 'Logout')
コード例 #8
0
def test_classes_urls(resp, classes: List[Classs]):
    for classs in classes:
        assert_contains(resp, classs.get_absolute_url())
コード例 #9
0
def test_title(resp):
    assert_contains(resp, '<title>Study of Django – Home</title>')
コード例 #10
0
def test_description(resp, modules: List[Module]):
    for module in modules:
        assert_contains(resp, module.description)
コード例 #11
0
def test_public(resp, modules: List[Module]):
    for module in modules:
        assert_contains(resp, module.public)
コード例 #12
0
def test_title(resp, modules: List[Module]):
    for module in modules:
        assert_contains(resp, module.title)
コード例 #13
0
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}"')
コード例 #14
0
def test_title_video(resp, videos):
    for video in videos:
        assert_contains(resp, video.title)
コード例 #15
0
def test_classes_titles(resp, classes):
    for classs in classes:
        assert_contains(resp, classs.title)
コード例 #16
0
def test_home_link(resp):
    assert_contains(resp, f'href="{reverse("base:home")}">Study of Django</a>')
コード例 #17
0
def test_classes_links(resp, classes):
    for classs in classes:
        assert_contains(resp, classs.get_absolute_url())
コード例 #18
0
def test_email_link(resp):
    assert_contains(resp, 'href="mailto:[email protected]"')
コード例 #19
0
def test_login_link_available(resp_home):
    assert_contains(resp_home, reverse('login'))
コード例 #20
0
def test_title_video(resp, video):
    assert_contains(resp, video.title)
コード例 #21
0
def test_name_logged_user_available(resp_home_with_logged_user, logged_user):
    assert_contains(resp_home_with_logged_user, logged_user.first_name)
コード例 #22
0
def test_content_video(resp, video):
    assert_contains(
        resp, f'<iframe src="https://player.vimeo.com/video/{video.vimeo_id}"')
コード例 #23
0
def test_title(resp, classs: Classs):
    assert_contains(resp, classs.title)
コード例 #24
0
def test_title(resp, module: Module):
    assert_contains(resp, module.title)
コード例 #25
0
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>'
    )
コード例 #26
0
def test_modules_titles(resp, modules):
    for module in modules:
        assert_contains(resp, module.title)