@@ -23,25 +23,25 @@ def finder(self, content):
23
23
return MediaTypeFinder (content )
24
24
25
25
def test_exact (self , finder , content ):
26
- response = MockResponse ( "" , mimetype = " application/json")
26
+ mimetype = " application/json"
27
27
28
- _ , mimetype = finder .find (response )
28
+ _ , mimetype = finder .find (mimetype )
29
29
assert mimetype == "application/json"
30
30
31
31
def test_match (self , finder , content ):
32
- response = MockResponse ( "" , mimetype = " text/html")
32
+ mimetype = " text/html"
33
33
34
- _ , mimetype = finder .find (response )
34
+ _ , mimetype = finder .find (mimetype )
35
35
assert mimetype == "text/*"
36
36
37
37
def test_not_found (self , finder , content ):
38
- response = MockResponse ( "" , mimetype = " unknown")
38
+ mimetype = " unknown"
39
39
40
40
with pytest .raises (MediaTypeNotFound ):
41
- finder .find (response )
41
+ finder .find (mimetype )
42
42
43
43
def test_missing (self , finder , content ):
44
- response = MockResponse ( "" , mimetype = None )
44
+ mimetype = None
45
45
46
46
with pytest .raises (MediaTypeNotFound ):
47
- finder .find (response )
47
+ finder .find (mimetype )
0 commit comments