示例#1
0
def test_link(response, videos):
    for video in videos:
        assert_contains(
            response,
            f'href="{reverse("character:video", args=(video.slug,))}"')
示例#2
0
def test_title(response, videos):
    for video in videos:
        assert_contains(response, video.character)
示例#3
0
def test_video(response, video):
    assert_contains(response,
                    f'src="https://www.youtube.com/embed/{video.youtube_id}"')
示例#4
0
def test_video_title(response, video):
    assert_contains(response, f'<h1 class="h2 my-3">{video.character}</h1>')
示例#5
0
def test_navbrand_link(response):
    assert_contains(response, f'href="{reverse("base:home")}"')
示例#6
0
def test_title(response):
    assert_contains(response, '<title>Home Page</title>')