mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 10:52:03 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import test_postgres_vacuum
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2025 Therp BV
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestPostgresVacuum(TransactionCase):
|
||||
def test_vacuum(self):
|
||||
with self.assertLogs("odoo.addons.postgres_vacuum", "DEBUG") as logs:
|
||||
self.env["ir.cron"]._postgres_vacuum(max_minutes=100, full_vacuum=True)
|
||||
|
||||
self.assertTrue(
|
||||
any("vacuum of table res_partner" in log for log in logs.output)
|
||||
)
|
||||
|
||||
def test_analyze(self):
|
||||
with self.assertLogs("odoo.addons.postgres_vacuum", "DEBUG") as logs:
|
||||
self.env["ir.cron"]._postgres_vacuum(max_minutes=100, full_vacuum=False)
|
||||
|
||||
self.assertTrue(
|
||||
any("analyze of table res_partner" in log for log in logs.output)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue