#2318: @paginate API breakage in 1.0.8
------------------------+---------------------------------------------------
Reporter: lmacken | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: TurboGears | Version: 1.0.8
Severity: major | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by toshio):
Okay, I've got some new test cases of which two fail:
{{{
# can't override limit when server-new-style says no and
# server-old-style says yes
self.request("/conflict_no_change_limit?data_tgp_limit=9")
assert '"data": [0, 1, 2, 3]' in self.body
# can override server-old-style limit
self.request("/old_limit?data_tgp_limit=5")
assert '"data": [0, 1, 2, 3, 4]' in self.body
Spy.assert_ok(self.body, 'page_count', 2)
Spy.assert_ok(self.body, 'limit', 5)
Spy.assert_ok(self.body, 'pages', xrange(1, 3))
}}}
The first one is when the new-style max_limit and old-style
allow_limit_override are specified in a conflicting manner so it's not too
worrisome. The second is a test case that mimics this bug report so it
shows the problem.
Will attach a patch with both testcases and a fix.
Note that I wasn't able to replicate this:
> Yet, specifying max_limit without allow_limit_override does not seem to
allow for limit overrides...
--
Ticket URL: <http://trac.turbogears.org/ticket/2318#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---