mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
Fix many tests and database storage
This commit is contained in:
parent
459b02c9a4
commit
8604593512
3 changed files with 33 additions and 25 deletions
|
@ -33,10 +33,10 @@ from tests import BaseTest
|
|||
|
||||
|
||||
class TestBaseAuthRequests(BaseTest):
|
||||
"""
|
||||
Tests basic requests with auth.
|
||||
"""Tests basic requests with auth.
|
||||
|
||||
We should setup auth for each type before creating the Application object.
|
||||
|
||||
We should setup auth for each type before create Application object
|
||||
"""
|
||||
|
||||
def setup(self):
|
||||
|
@ -47,6 +47,7 @@ class TestBaseAuthRequests(BaseTest):
|
|||
radicale.auth.is_authenticated = lambda *_: True
|
||||
|
||||
def test_root(self):
|
||||
"""Htpasswd authentication."""
|
||||
self.colpath = tempfile.mkdtemp()
|
||||
htpasswd_file_path = os.path.join(self.colpath, ".htpasswd")
|
||||
with open(htpasswd_file_path, "wb") as fd:
|
||||
|
@ -65,6 +66,7 @@ class TestBaseAuthRequests(BaseTest):
|
|||
assert "Radicale works!" in answer
|
||||
|
||||
def test_custom(self):
|
||||
"""Custom authentication."""
|
||||
config.set("auth", "type", "custom")
|
||||
config.set("auth", "custom_handler", "tests.custom.auth")
|
||||
self.application = radicale.Application()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue