Beispiel #1
0
def test_accept_best_match() -> None:
    accept = Accept('gzip, deflate, br;q=0.9, *;q=0.8')
    assert accept.best_match(['gzip', 'defalte']) == 'gzip'
    assert accept.best_match(['br', 'deflate']) == 'deflate'
    assert accept.best_match(['bizarre']) == 'bizarre'
Beispiel #2
0
def test_accept_best_match() -> None:
    accept = Accept("gzip, deflate, br;q=0.9, *;q=0.8")
    assert accept.best_match(["gzip", "defalte"]) == "gzip"
    assert accept.best_match(["br", "deflate"]) == "deflate"
    assert accept.best_match(["bizarre"]) == "bizarre"