

def test_can_refresh_without_limiting(self):
    mock_config = {
        'REFRESH_INTERVAL': timedelta(days=1),
        'REFRESH_LIMITING': False,
    }
    with patch.dict(app.config, values=mock_config, clear=True):
        self.assertTrue(self.card.can_refresh)
    with patch.dict(app.config, values=mock_config, clear=True):
        old_val = self.card.last_loaded
        self.card.last_loaded = datetime(year=2999, month=1, day=1)
        self.assertFalse(self.card.can_refresh)
        self.card.last_loaded = old_val

dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/tests/models/test_card.py BreezeCardTestCase.test_can_refresh_without_limiting/original