fix: support v2 and hybrid qBittorrent identities

This commit is contained in:
2026-07-23 11:48:08 +00:00
parent 69709c778b
commit 6ca94a546e
10 changed files with 240 additions and 74 deletions
+5 -4
View File
@@ -48,7 +48,6 @@ class ClientJobHappyPathTests(unittest.TestCase):
sparse_supported=True,
free_space_reserve_bytes=100,
)
before = {path.name for path in root.iterdir()}
with patch(
"archive_clients.jobs.shutil.disk_usage",
return_value=Mock(free=109),
@@ -57,9 +56,9 @@ class ClientJobHappyPathTests(unittest.TestCase):
"109 bytes available, 110 bytes required including reserve",
):
executor._require_space(root, 10)
self.assertEqual(
self.assertLessEqual(
{path.name for path in root.iterdir()},
before,
{"client.db", "client.db-wal", "client.db-shm"},
)
def test_archive_and_unarchive_five_step_execution(self):
@@ -135,7 +134,9 @@ class ClientJobHappyPathTests(unittest.TestCase):
source_qb = Mock()
source_qb.get_resource.return_value = resource
target_qb = Mock()
target_qb.get_resource.side_effect = [None, None, resource]
target_qb.get_resource.side_effect = [
None, None, resource, resource,
]
syncthing = CompleteSyncthing()
source = ClientJobExecutor(
client_id=source_id,