

def test_attributes(self):
    'Sort class pulls field and direction attrs from request.GET.'
    s = self.cls('path', {
        'sortfield': 'name',
        'sortdirection': 'desc',
    })
    self.assertEqual(s.field, 'name')
    self.assertEqual(s.direction, 'desc')

dataset/ETHPy150Open mozilla/moztrap/tests/view/lists/test_sort.py SortTest.test_attributes/original