Skip to content

Commit

Permalink
[FIX] stock_average_daily_sale: Don't test the not refreshed material…
Browse files Browse the repository at this point in the history
…ized view
  • Loading branch information
rousseldenis committed Oct 11, 2023
1 parent 08a8786 commit f2f8d26
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions stock_average_daily_sale/tests/test_average_daily_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,3 @@ def test_view_refreshed(self):
self.env["stock.average.daily.sale"].search_read(
[("product_id", "=", self.product_1.id)]
)

def test_view_not_refreshed(self):
with self.assertLogs(
"odoo.addons.stock_average_daily_sale.models.stock_average_daily_sale",
level="WARNING",
) as logger:
self.env["stock.average.daily.sale"].search(
[("product_id", "=", self.product_1.id)]
)
self.assertIn(
str("The materialized view has not been populated. Launch the cron."),
str(logger.output),
)
# Check if we can still query database
product = self.env["product.product"].search([("id", "=", self.product_1.id)])
self.assertEqual(
product,
self.product_1,
)

0 comments on commit f2f8d26

Please sign in to comment.