From 4b7092bd0aec1e72c80e30a4b8c05bd73df778bb Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 11 Jan 2025 23:55:40 -0600 Subject: [PATCH] tests: fix grid data test for report view --- tests/views/test_reports.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/views/test_reports.py b/tests/views/test_reports.py index 8f0de1b..6fe8fd4 100644 --- a/tests/views/test_reports.py +++ b/tests/views/test_reports.py @@ -51,8 +51,13 @@ class TestReportViews(WebTestCase): def test_get_grid_data(self): view = self.make_view() - data = view.get_grid_data() - self.assertIsInstance(data, list) + providers = dict(self.app.providers) + providers['wuttatest'] = MagicMock(report_modules=['tests.views.test_reports']) + with patch.object(self.app, 'providers', new=providers): + + data = view.get_grid_data() + self.assertIsInstance(data, list) + self.assertTrue(data) # 1+ reports def test_normalize_report(self): view = self.make_view()