def test_is_limit_exceeded_false(self, monkeypatch): monkeypatch.setitem(Utility.environment['model']['data_importer'], "limit_per_day", 6) bot = 'test' assert not DataImporterLogProcessor.is_limit_exceeded(bot)
def test_is_limit_exceeded_exception(self, monkeypatch): monkeypatch.setitem(Utility.environment['model']['data_importer'], "limit_per_day", 3) bot = 'test' with pytest.raises(AppException): assert DataImporterLogProcessor.is_limit_exceeded(bot)