Skip to content

Commit

Permalink
[#790] make tests python 2.6 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
joetsoi committed May 13, 2014
1 parent 0840aef commit 51f865a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ckanext/example_idatasetform/tests/test_example_idatasetform.py
Expand Up @@ -235,16 +235,14 @@ def test_custom_search(self):
response.forms[1].fields['sort'][0].value = 'custom_text asc'
response = response.forms[1].submit()
# check that package_b appears before package a (y < z)
nt.assert_less(
response.body.index('test_package_b'),
response.body.index('test_package_a'),
)
a = response.body.index('test_package_a')
b = response.body.index('test_package_b')
nt.assert_true(b < a)

response.forms[1].fields['sort'][0].value = 'custom_text desc'
# check that package_a appears before package b (z is first in
# descending order)
response = response.forms[1].submit()
nt.assert_less(
response.body.index('test_package_a'),
response.body.index('test_package_b')
)
a = response.body.index('test_package_a')
b = response.body.index('test_package_b')
nt.assert_true(a < b)

0 comments on commit 51f865a

Please sign in to comment.