def test_sort(self):
        q = self \
            .query.metrics('pageviews') \
            .range('2014-07-01', '2014-07-05').interval('day')

        unsorted_report = q.get()
        sorted_report = q \
            .sort('pageviews').get()
        inverse_sorted_report = q \
            .sort(-self.profile.core.columns['pageviews']).get()

        self.assertEqual(inverse_sorted_report.queries[0].raw['sort'], '-ga:pageviews')
        self.assertEqual(
            set(unsorted_report['pageviews']),
            set(sorted_report['pageviews']),
        )
        self.assertEqual(
            sorted_report['pageviews'],
            inverse_sorted_report['pageviews'][::-1],
        )
Ensure that we can make a token and that it is valid
dataset/ETHPy150Open debrouwere/google-analytics/googleanalytics/tests/query.py/TestQuerying.test_sort--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/auth/tests/tokens.py/TokenGeneratorTest.test_make_token