'Get from the url w/ a sort option and ensure items honor that sort'

def assert_correct_sort_response(self, url, sort, direction):

    resp = self.client.get(((((url + '?sort=') + sort) + '&direction=') + direction), HTTP_ACCEPT='application/json')
    json_response = json.loads(resp.content)
    assets_response = json_response['assets']
    name1 = assets_response[0][sort]
    name2 = assets_response[1][sort]
    name3 = assets_response[2][sort]
    if (direction == 'asc'):
        self.assertLessEqual(name1, name2)
        self.assertLessEqual(name2, name3)
    else:
        self.assertGreaterEqual(name1, name2)
        self.assertGreaterEqual(name2, name3)
