mirror of
https://github.com/pypiserver/pypiserver
synced 2024-11-09 16:45:51 +01:00
Replace function call with set literal
This commit is contained in:
parent
288f38f26e
commit
31a5b5d7e7
@ -1503,10 +1503,10 @@ class BaseResponse(object):
|
||||
# Header blacklist for specific response codes
|
||||
# (rfc2616 section 10.2.3 and 10.3.5)
|
||||
bad_headers = {
|
||||
204: set(('Content-Type', )),
|
||||
304: set(('Allow', 'Content-Encoding', 'Content-Language',
|
||||
'Content-Length', 'Content-Range', 'Content-Type',
|
||||
'Content-Md5', 'Last-Modified'))
|
||||
204: {'Content-Type'},
|
||||
304: {'Allow', 'Content-Encoding', 'Content-Language',
|
||||
'Content-Length', 'Content-Range', 'Content-Type', 'Content-Md5',
|
||||
'Last-Modified'}
|
||||
}
|
||||
|
||||
def __init__(self, body='', status=None, headers=None, **more_headers):
|
||||
|
@ -349,7 +349,7 @@ def test_simple_index_list_name_with_underscore_no_egg(root, testapp):
|
||||
resp = testapp.get("/simple/")
|
||||
assert len(resp.html("a")) == 1
|
||||
hrefs = set([x["href"] for x in resp.html("a")])
|
||||
assert hrefs == set(["foo-bar/"])
|
||||
assert hrefs == {"foo-bar/"}
|
||||
|
||||
|
||||
def test_no_cache_control_set(root, _app, testapp):
|
||||
|
Loading…
Reference in New Issue
Block a user