1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Clean tests

This commit is contained in:
Guillaume Ayoub 2016-04-07 19:25:10 +02:00
parent 595e2329ea
commit 54dee0c7c4
6 changed files with 25 additions and 76 deletions

View file

@ -26,8 +26,7 @@ import os
import radicale
import tempfile
from radicale import config
from radicale.auth import htpasswd
from radicale import config, auth
from . import BaseTest
@ -55,8 +54,8 @@ class TestBaseAuthRequests(BaseTest):
hashlib.sha1(b"bepo").digest()))
config.set("auth", "type", "htpasswd")
htpasswd.FILENAME = htpasswd_file_path
htpasswd.ENCRYPTION = "sha1"
auth.FILENAME = htpasswd_file_path
auth.ENCRYPTION = "sha1"
self.application = radicale.Application()
@ -67,8 +66,7 @@ class TestBaseAuthRequests(BaseTest):
def test_custom(self):
"""Custom authentication."""
config.set("auth", "type", "custom")
config.set("auth", "custom_handler", "tests.custom.auth")
config.set("auth", "type", "tests.custom.auth")
self.application = radicale.Application()
status, headers, answer = self.request(
"GET", "/", HTTP_AUTHORIZATION=self.userpass)