def test_mongo_storage_get_usage(self):
        # Make 3 requests to make sure we have enough records
        self.client.get('/')
        self.client.get('/')
        self.client.get('/')

        # Limit tests
        assert len(self.storage.get_usage()) == 3
        assert len(self.storage.get_usage(limit=2)) == 2
        assert len(self.storage.get_usage(limit=1)) == 1

        # Page tests
        assert len(self.storage.get_usage(limit=2, page=1)) == 2
        assert len(self.storage.get_usage(limit=2, page=2)) == 1

        # timing tests
        now = datetime.datetime.utcnow()
        assert len(self.storage.get_usage(start_date=now)) == 0
        assert len(self.storage.get_usage(end_date=now)) == 3
        assert len(self.storage.get_usage(end_date=now, limit=2)) == 2
Generates the according datetime object using given parameters
dataset/ETHPy150Open ashcrow/flask-track-usage/test/test_storage_mongo.py/TestMongoStorage.test_mongo_storage_get_usage--crossover with--dataset/ETHPy150Open FichteFoll/InsertDate/format_date/__init__.py/FormatDate.date_gen