Honor Store credentials in all storetool commands
Debian Trixie package bundle / packages (push) Successful in 21m50s

This commit is contained in:
Mario Fetka
2026-07-23 13:21:44 +02:00
parent 2a58e7a186
commit 25c4aed9d7
8 changed files with 84 additions and 33 deletions
@@ -22,12 +22,15 @@
import io
from pathlib import Path
import tempfile
from types import SimpleNamespace
import unittest
from unittest import mock
from bongo import table
from bongo.Console import wrap
from bongo.external.simpletal import simpleTAL, simpleTALES
from bongo.store.StoreClient import CalendarACL, StoreClient
from bongo.storetool.Connection import connect_store
from bongo.storetool.ExportMailbox import MaildirMailbox, MboxMailbox
@@ -54,6 +57,17 @@ class _Stream:
class Python3RuntimeTests(unittest.TestCase):
@mock.patch("bongo.storetool.Connection.StoreClient")
def test_storetool_connection_uses_every_global_option(self, client):
options = SimpleNamespace(
user="alice", store="alice-store", host="store.example.test",
port="1689", password="secret")
connect_store(options)
client.assert_called_once_with(
"alice", "alice-store", host="store.example.test", port=1689,
authPassword="secret")
def test_console_table_and_unicode_template_are_text(self):
self.assertIsInstance(wrap("Grüße 世界", width=8), str)
self.assertEqual(table.format_table(["Name"], [["Müller"]]),