def test_build_query(self):
        self.maxDiff = None
        filters, pagination, sort, range_filters = self._get_build_query_args()
        query = Events._build_query(filters=filters, sort=sort, pagination=pagination, range_filters=range_filters)
        expected_query = self._get_expected_query()
        # match the order of conditions list in both queries
        # to overcome order differences in comparison
        self._sort_query_conditions_list(expected_query)
        self._sort_query_conditions_list(query)

        self.assertDictEqual(expected_query, query)
    def test_build_query(self):
        self.maxDiff = None
        filters, pagination, sort, range_filters = self._get_build_query_args()
        query = Events._build_query(filters=filters,
                                    sort=sort,
                                    pagination=pagination,
                                    range_filters=range_filters)
        expected_query = self._get_expected_query()
        # match the order of conditions list in both queries
        # to overcome order differences in comparison
        self._sort_query_conditions_list(expected_query)
        self._sort_query_conditions_list(query)

        self.assertDictEqual(expected_query, query)
 def test_build_query_no_args(self):
     # make sure nothing crashes...
     Events._build_query()
 def test_build_query_no_args(self):
     # make sure nothing crashes...
     Events._build_query()