3
0
Fork 0

tests: fix grid data test for report view

This commit is contained in:
Lance Edgar 2025-01-11 23:55:40 -06:00
parent 1ec25636df
commit 4b7092bd0a

View file

@ -51,8 +51,13 @@ class TestReportViews(WebTestCase):
def test_get_grid_data(self): def test_get_grid_data(self):
view = self.make_view() view = self.make_view()
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() data = view.get_grid_data()
self.assertIsInstance(data, list) self.assertIsInstance(data, list)
self.assertTrue(data) # 1+ reports
def test_normalize_report(self): def test_normalize_report(self):
view = self.make_view() view = self.make_view()