/
oriono
/
taskman
Обзор
Документация
Войти
/
oriono
/
taskman
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
tests/test_trigger_error.py
20 строк
650 B
abo
Change all comments from Russian to English
09 июн 2026, 01:24
09 июн 2026, 01:24
30030ef
Код
Авторство
О чём код?
# from django.test import TestCase, Client # from unittest.mock import patch # class RollbarTriggerErrorTests(TestCase): # def setUp(self): # self.client = Client() # @patch('rollbar.report_exc_info') # Replace Rollbar with mock object # def test_trigger_error(self, mock_rollbar): # """ # Test that a division by zero error occurs and Rollbar is called. # """ # response = None # try: # response = self.client.get('/trigger-error/') # except ZeroDivisionError: # pass # self.assertIsNone(response) # self.assertTrue(mock_rollbar.called)