mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-31 20:15:44 +00:00
Chore: make the backend test suite pass on PostgreSQL
Remove SQLite-only assumptions from the tests: hard-coded primary keys, NULL ordering, the database vendor, and the CPU-dependent default process count. Keep the test connection open inside the test transaction, since close_old_connections() and connections.close_all() really close it on PostgreSQL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
80a1827fa0
commit
2cb04b0b8b
13 files changed
+121
-79
No files matched your search
@@ -174,8 +174,8 @@ class TestWorkflows(
|
||||
w.save()
|
||||
|
||||
self.assertEqual(w.__str__(), "Workflow: Workflow 1")
|
||||
self.assertEqual(trigger.__str__(), "WorkflowTrigger 1")
|
||||
self.assertEqual(action.__str__(), "WorkflowAction 1")
|
||||
self.assertEqual(trigger.__str__(), f"WorkflowTrigger {trigger.pk}")
|
||||
self.assertEqual(action.__str__(), f"WorkflowAction {action.pk}")
|
||||
|
||||
test_file = shutil.copy(
|
||||
self.SIMPLE_PDF,
|
||||
@@ -433,7 +433,7 @@ class TestWorkflows(
|
||||
list(document.tags.all()),
|
||||
[self.t1, self.t2, self.t3],
|
||||
)
|
||||
self.assertEqual(
|
||||
self.assertCountEqual(
|
||||
list(
|
||||
get_users_with_perms(
|
||||
document,
|
||||
|
||||
Reference in new issue
Block a user