mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
Small improvements for tests
This commit is contained in:
parent
08919510cb
commit
9f0611cd20
2 changed files with 145 additions and 105 deletions
|
@ -64,7 +64,7 @@ class TestBaseAuthRequests(BaseTest):
|
|||
for user, password, expected_status in (
|
||||
("tmp", "bepo", 207), ("tmp", "tmp", 401), ("tmp", "", 401),
|
||||
("unk", "unk", 401), ("unk", "", 401), ("", "", 401)):
|
||||
status, headers, answer = self.request(
|
||||
status, _, answer = self.request(
|
||||
"PROPFIND", "/",
|
||||
HTTP_AUTHORIZATION="Basic %s" % base64.b64encode(
|
||||
("%s:%s" % (user, password)).encode()).decode())
|
||||
|
@ -139,7 +139,7 @@ class TestBaseAuthRequests(BaseTest):
|
|||
"""Custom authentication."""
|
||||
self.configuration["auth"]["type"] = "tests.custom.auth"
|
||||
self.application = Application(self.configuration, self.logger)
|
||||
status, headers, answer = self.request(
|
||||
status, _, answer = self.request(
|
||||
"PROPFIND", "/tmp", HTTP_AUTHORIZATION="Basic %s" %
|
||||
base64.b64encode(("tmp:").encode()).decode())
|
||||
assert status == 207
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue