def test_default_filter_30_days(self):
        @gen.coroutine
        def store_messages():
            message = {'thing': 'test', 'created': datetime.utcnow(), 'content': {}}
            yield self.db.messages.insert(message)
            message = {'thing': 'test', 'created': datetime.utcnow() - timedelta(days=31), 'content': {}}
            yield self.db.messages.insert(message)

        self.io_loop.run_sync(store_messages)

        resp = self._get('/get/messages/for/test')
        self.assertEqual(1, len(json.loads(to_unicode(resp.body))['with']))
dataset/ETHPy150Open simock85/sharknado/tests/test_sharknado.py/TestServices.test_default_filter_30_days/original