Commit 14fd96c 1 parent 4c8c4fe commit 14fd96c Copy full SHA for 14fd96c
File tree 3 files changed +19
-19
lines changed
3 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 3
3
4
4
5
5
def test_dont_show_blame_link ():
6
- with serve ():
7
- for file in ["binary" , "image.jpg" , "toolarge" ]:
8
- response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/" + file ).content
9
- assert "blame" not in response
6
+ with serve ():
7
+ for file in ["binary" , "image.jpg" , "toolarge" ]:
8
+ response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/" + file ).content
9
+ assert "blame" not in response
10
10
11
11
12
12
def test_dont_render_blame ():
13
13
"""Don't render blame even if someone navigated to the blame site by accident."""
14
- with serve ():
15
- for file in ["binary" , "image.jpg" , "toolarge" ]:
16
- response = requests .get (TEST_REPO_DONT_RENDER_URL + "blame/HEAD/" + file ).content
17
- assert "Can't show blame" in response
14
+ with serve ():
15
+ for file in ["binary" , "image.jpg" , "toolarge" ]:
16
+ response = requests .get (TEST_REPO_DONT_RENDER_URL + "blame/HEAD/" + file ).content
17
+ assert "Can't show blame" in response
Original file line number Diff line number Diff line change @@ -100,10 +100,10 @@ def can_reach_auth():
100
100
101
101
# Clone
102
102
def can_clone_unauth ():
103
- return _can_clone (_GET_unauth , UNAUTH_TEST_REPO_URL )
103
+ return _can_clone (_GET_unauth , UNAUTH_TEST_REPO_URL )
104
104
105
105
def can_clone_auth ():
106
- return _can_clone (_GET_auth , AUTH_TEST_REPO_URL )
106
+ return _can_clone (_GET_auth , AUTH_TEST_REPO_URL )
107
107
108
108
def _can_clone (http_get , url ):
109
109
tmp = tempfile .mkdtemp ()
Original file line number Diff line number Diff line change @@ -23,18 +23,18 @@ def test_no_newline_at_end_of_file():
23
23
24
24
25
25
def test_dont_render_binary ():
26
- with serve ():
27
- response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/binary" ).content
28
- assert "Binary data not shown" in response
26
+ with serve ():
27
+ response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/binary" ).content
28
+ assert "Binary data not shown" in response
29
29
30
30
31
31
def test_render_image ():
32
- with serve ():
33
- response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/image.jpg" ).content
34
- assert '<img src="/dont-render/raw/HEAD/image.jpg"' in response
32
+ with serve ():
33
+ response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/image.jpg" ).content
34
+ assert '<img src="/dont-render/raw/HEAD/image.jpg"' in response
35
35
36
36
37
37
def test_dont_render_large_file ():
38
- with serve ():
39
- response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/toolarge" ).content
40
- assert "Large file not shown" in response
38
+ with serve ():
39
+ response = requests .get (TEST_REPO_DONT_RENDER_URL + "blob/HEAD/toolarge" ).content
40
+ assert "Large file not shown" in response
You can’t perform that action at this time.
0 commit comments