def test_past_date(self):
        value = self.sd.past_date()
        self.assertTrue(isinstance(value, datetime.date))

        self.assertTrue(datetime.date.today() <= value)
        self.assertTrue(value >= (datetime.date.today() - datetime.timedelta(days=365)))

        value = self.sd.past_date(0, 10)
        self.assertTrue(value <= datetime.date.today())
        self.assertTrue(value >= (datetime.date.today() - datetime.timedelta(days=10)))

        with self.assertRaises(ParameterError):
            self.sd.past_date(100, 0)

        with self.assertRaises(ParameterError):
            self.sd.past_date(-10, 10)
dataset/ETHPy150Open kaleidos/django-sampledatahelper/tests/tests.py/TestTimeHelpers.test_past_date/swapped operands of `<=`