forked from github.com/pypiserver
Remove redundant parentheses
This commit is contained in:
parent
31a5b5d7e7
commit
676e86d683
@ -51,7 +51,7 @@ parser.add_option("-c", "--config-file",
|
||||
help=("Specify the path to the buildout configuration "
|
||||
"file to be used."))
|
||||
parser.add_option("-f", "--find-links",
|
||||
help=("Specify a URL to search for buildout releases"))
|
||||
help="Specify a URL to search for buildout releases")
|
||||
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
@ -233,7 +233,7 @@ def main(argv=None):
|
||||
c.password_file = v
|
||||
elif k in ("-o", "--overwrite"):
|
||||
c.overwrite = True
|
||||
elif k in ("--hash-algo"):
|
||||
elif k in "--hash-algo":
|
||||
c.hash_algo = None if not pypiserver.str2bool(v, c.hash_algo) else v
|
||||
elif k == "--log-file":
|
||||
c.log_file = v
|
||||
|
@ -1380,7 +1380,7 @@ class BaseRequest(object):
|
||||
basic = parse_auth(self.environ.get('HTTP_AUTHORIZATION', ''))
|
||||
if basic: return basic
|
||||
ruser = self.environ.get('REMOTE_USER')
|
||||
if ruser: return (ruser, None)
|
||||
if ruser: return ruser, None
|
||||
return None
|
||||
|
||||
@property
|
||||
|
@ -381,9 +381,9 @@ def test_upload_badAction(root, testapp):
|
||||
assert "Unsupported ':action' field: BAD" in hp.unescape(resp.text)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("package"), [f[0]
|
||||
for f in test_core.files
|
||||
if f[1] and '/' not in f[0]])
|
||||
@pytest.mark.parametrize("package", [f[0]
|
||||
for f in test_core.files
|
||||
if f[1] and '/' not in f[0]])
|
||||
def test_upload(package, root, testapp):
|
||||
resp = testapp.post("/", params={':action': 'file_upload'},
|
||||
upload_files=[('content', package, b'')])
|
||||
@ -393,9 +393,9 @@ def test_upload(package, root, testapp):
|
||||
assert uploaded_pkgs[0].lower() == package.lower()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("package"), [f[0]
|
||||
for f in test_core.files
|
||||
if f[1] and '/' not in f[0]])
|
||||
@pytest.mark.parametrize("package", [f[0]
|
||||
for f in test_core.files
|
||||
if f[1] and '/' not in f[0]])
|
||||
def test_upload_with_signature(package, root, testapp):
|
||||
resp = testapp.post("/", params={':action': 'file_upload'},
|
||||
upload_files=[
|
||||
@ -408,7 +408,7 @@ def test_upload_with_signature(package, root, testapp):
|
||||
assert '%s.asc' % package.lower() in uploaded_pkgs
|
||||
|
||||
|
||||
@pytest.mark.parametrize(("package"), [
|
||||
@pytest.mark.parametrize("package", [
|
||||
f[0] for f in test_core.files
|
||||
if f[1] is None])
|
||||
def test_upload_badFilename(package, root, testapp):
|
||||
|
Loading…
Reference in New Issue
Block a user