with self.assertNoLogs("", level="ERROR")
reference: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertNoLogs