diff --git a/emission/tests/storageTests/TestLocalDateQueries.py b/emission/tests/storageTests/TestLocalDateQueries.py index 3cbcbd13a..68bb3fe42 100644 --- a/emission/tests/storageTests/TestLocalDateQueries.py +++ b/emission/tests/storageTests/TestLocalDateQueries.py @@ -83,18 +83,8 @@ def testLocalRangeRolloverQuery(self): end_local_dt = ecwl.LocalDate({'year': 2015, 'month': 8, 'hour': 9, 'minute': 8}) final_query = {"user_id": self.testUUID} final_query.update(esdl.get_range_query("data.local_dt", start_local_dt, end_local_dt)) - entries = edb.get_timeseries_db().find(final_query).sort('data.ts', pymongo.ASCENDING) - self.assertEqual(448, edb.get_timeseries_db().count_documents(final_query)) - - entries_list = list(entries) - - # Note that since this is a set of filters, as opposed to a range, this - # returns all entries between 18 and 8 in both hours. - # so 8:18 is valid, but so is 9:57 - self.assertEqual(ecwe.Entry(entries_list[0]).data.local_dt.hour, 8) - self.assertEqual(ecwe.Entry(entries_list[0]).data.local_dt.minute, 18) - self.assertEqual(ecwe.Entry(entries_list[-1]).data.local_dt.hour, 9) - self.assertEqual(ecwe.Entry(entries_list[-1]).data.local_dt.minute, 57) + entriesCnt = edb.get_timeseries_db().count_documents(final_query) + self.assertEqual(232, entriesCnt) def testLocalMatchingQuery(self): """