@@ -0,0 +1,1092 @@
+import unittest%0Aimport aiounittest%0Aimport mock%0Afrom honeybadger import contrib%0Afrom fastapi import FastAPI%0Afrom fastapi.testclient import TestClient%0A%0A%0Aclass FastAPITestCase(unittest.TestCase):%0A    def setUp(self):%0A        app = FastAPI()%0A        app.router.route_class = contrib.HoneybadgerRoute%0A%0A        @app.get(%22/ok%22)%0A        def ok_route():%0A            return %22ok%22%0A%0A        @app.get(%22/ko%22)%0A        def ko_route():%0A            return 1 / 0%0A%0A        self.client = TestClient(app, raise_server_exceptions=False)%0A%0A    @mock.patch(%22honeybadger.contrib.fastapi.honeybadger%22)%0A    def test_should_not_notify_on_ok_route(self, hb):%0A        response = self.client.get(%22/ok%22)%0A        self.assertEqual(response.status_code, 200)%0A        hb.notify.assert_not_called()%0A%0A    @mock.patch(%22honeybadger.contrib.fastapi.honeybadger%22)%0A    def test_should_notify_on_ko_route(self, hb):%0A        response = self.client.get(%22/ko%22)%0A        self.assertEqual(response.status_code, 500)%0A        hb.notify.assert_called_once()%0A        self.assertEqual(type(hb.notify.call_args.kwargs%5B%22exception%22%5D), ZeroDivisionError)

add FastAPI custom route tests.