Change default value for external users

This commit is contained in:
Unrud
2020-01-12 23:32:26 +01:00
parent a7f4ffa7d4
commit caf5ff1080
9 changed files with 16 additions and 15 deletions

View File

@@ -47,7 +47,7 @@ class TestBaseAuthRequests(BaseTest):
# Disable syncing to disk for better performance
"internal": {"filesystem_fsync": "False"},
# Set incorrect authentication delay to a very low value
"auth": {"delay": "0.002"}}, "test")
"auth": {"delay": "0.002"}}, "test", internal=True)
def teardown(self):
shutil.rmtree(self.colpath)

View File

@@ -1476,7 +1476,7 @@ permissions: RrWw""")
# Disable syncing to disk for better performance
"internal": {"filesystem_fsync": "False"},
"rights": {"file": rights_file_path,
"type": "from_file"}}, "test")
"type": "from_file"}}, "test", internal=True)
self.application = Application(self.configuration)
def teardown(self):
@@ -1490,7 +1490,7 @@ class TestMultiFileSystem(BaseFileSystemTest, BaseRequestsMixIn):
def test_fsync(self):
"""Create a directory and file with syncing enabled."""
self.configuration.update({
"internal": {"filesystem_fsync": "True"}}, "test")
"internal": {"filesystem_fsync": "True"}}, "test", internal=True)
self.application = Application(self.configuration)
status, _, _ = self.request("MKCALENDAR", "/calendar.ics/")
assert status == 201

View File

@@ -134,10 +134,11 @@ class TestConfig:
def test_internal(self):
configuration = config.load()
configuration.update({"internal": {"internal_server": "True"}}, "test")
configuration.update({"internal": {"internal_server": "True"}}, "test",
internal=True)
with pytest.raises(Exception) as exc_info:
configuration.update({"internal": {"internal_server": "True"}},
"test", internal=False)
configuration.update(
{"internal": {"internal_server": "True"}}, "test")
e = exc_info.value
assert "Invalid section 'internal'" in str(e)

View File

@@ -38,7 +38,7 @@ class TestBaseRightsRequests(BaseTest):
self.configuration.update({
"storage": {"filesystem_folder": self.colpath},
# Disable syncing to disk for better performance
"internal": {"filesystem_fsync": "False"}}, "test")
"internal": {"filesystem_fsync": "False"}}, "test", internal=True)
def teardown(self):
shutil.rmtree(self.colpath)

View File

@@ -68,7 +68,7 @@ class TestBaseServerRequests:
# Enable debugging for new processes
"logging": {"level": "debug"},
# Disable syncing to disk for better performance
"internal": {"filesystem_fsync": "False"}}, "test")
"internal": {"filesystem_fsync": "False"}}, "test", internal=True)
self.thread = threading.Thread(target=server.serve, args=(
self.configuration, shutdown_socket_out))
ssl_context = ssl.create_default_context()

View File

@@ -36,7 +36,7 @@ class TestBaseWebRequests(BaseTest):
self.configuration.update({
"storage": {"filesystem_folder": self.colpath},
# Disable syncing to disk for better performance
"internal": {"filesystem_fsync": "False"}}, "test")
"internal": {"filesystem_fsync": "False"}}, "test", internal=True)
self.application = Application(self.configuration)
def teardown(self):