def test_filter_message_days(self):
        @gen.coroutine
        def store_messages():
            delta_days = [1, 1, 2, 3, 5, 8]
            for days in delta_days:
                created = timedelta(days=days) - datetime.utcnow()
                message = {'thing': 'test', 'created': created, 'content': {}}
                yield self.db.messages.insert(message)

        self.io_loop.run_sync(store_messages)

        resp = self._get('/get/messages/for/test/past/4-days')
        self.assertEqual(4, len(json.loads(to_unicode(resp.body))['with']))

        resp = self._get('/get/messages/for/test/past/7-day')
        self.assertEqual(5, len(json.loads(to_unicode(resp.body))['with']))
dataset/ETHPy150Open simock85/sharknado/tests/test_sharknado.py/TestServices.test_filter_message_days/swapped operands of `-`