              "ensure proper test isolation and silence this failure."
          )
          with self.assertRaisesMessage(AssertionError, message):
              connections['other'].connect()
          with self.assertRaisesMessage(AssertionError, message):
              connections['other'].temporary_connection()
  
      def test_disallowed_database_queries(self):
          message = (
              "Database queries to 'other' are not allowed in this test. "
 
</s> remove         with self.assertRaisesMessage(AssertionError, message):
 </s> add         with self.assertRaisesMessage(DatabaseOperationForbidden, message): </s> remove         with self.assertRaisesMessage(AssertionError, message):
 </s> add         with self.assertRaisesMessage(DatabaseOperationForbidden, message): </s> remove         with self.assertRaisesMessage(AssertionError, expected_message):
 </s> add         with self.assertRaisesMessage(DatabaseOperationForbidden, expected_message): </s> remove         with self.assertRaisesMessage(AssertionError, message):
 </s> add         with self.assertRaisesMessage(DatabaseOperationForbidden, message): </s> remove         with self.assertRaisesMessage(AssertionError, expected_message):
 </s> add         with self.assertRaisesMessage(DatabaseOperationForbidden, expected_message):
        with self.assertRaisesMessage(DatabaseOperationForbidden, message):
              "ensure proper test isolation and silence this failure."
          )
          with self.assertRaisesMessage(AssertionError, message):
              connections['other'].connect()
        with self.assertRaisesMessage(DatabaseOperationForbidden, message):
              connections['other'].temporary_connection()
  
      def test_disallowed_database_queries(self):
          message = (
              "Database queries to 'other' are not allowed in this test. "
keep keep keep keep replace keep keep keep keep keep
 Fixed #33278 -- Improved error for connection/query attempts against disallowed databases in tests. 
tests/test_utils/test_testcase.py