def test_get_orders(self):
        """
        """
        # First there is no closed order
        orders = lfs.marketing.utils.get_orders()
        self.assertEqual(len(orders), 0)

        # Close order
        self.o.state = CLOSED
        self.o.save()

        # But order is closed within the limit, so there is still no order for
        # rating mails
        orders = lfs.marketing.utils.get_orders()
        self.assertEqual(len(orders), 0)

        # Set the state modified date before the limit
        self.o.state_modified = datetime.now() - timedelta(days=15)
        self.o.save()

        # Now there is a order for which there should a rating mail be sent
        orders = lfs.marketing.utils.get_orders()
        self.assertEqual(len(orders), 1)
dataset/ETHPy150Open diefenbach/django-lfs/lfs/marketing/tests.py/RatingMailTestCase.test_get_orders/original