3
0
Fork 0

feat: add backend pagination support for grids

This commit is contained in:
Lance Edgar 2024-08-16 22:52:24 -05:00
parent dd3d640b1c
commit d151758c48
7 changed files with 501 additions and 29 deletions

View file

@ -747,6 +747,14 @@ class TestMasterView(WebTestCase):
data = [{'name': 'foo', 'value': 'bar'}]
with patch.object(view, 'get_grid_data', return_value=data):
response = view.index()
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content_type, 'text/html')
# then once more as 'partial' - aka. data only
self.request.GET = {'partial': '1'}
response = view.index()
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content_type, 'application/json')
def test_create(self):
self.pyramid_config.include('wuttaweb.views.common')