feat: add backend pagination support for grids
This commit is contained in:
parent
dd3d640b1c
commit
d151758c48
7 changed files with 501 additions and 29 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue