Beispiel #1
0
 def test_invalid_sort_param_is_removed(self):
     payload = {'order': 'id'}
     result = pagination.get_order_value(payload, ['name'])
     eq_(result, None)
Beispiel #2
0
 def test_reverse_sort_param_is_passed(self):
     payload = {'order': '-last_name'}
     result = pagination.get_order_value(payload, ['first_name', 'last_name'])
     eq_(result, '-last_name')