@run_with_all_backends
    def test_uses_referrals(self):
        domain = 'special_domain'
        _, xform, _ = submit_form_locally(
            """<data xmlns="example.com/foo">
                <meta>
                    <instanceID>abc-easy-as-456</instanceID>
                </meta>
            <case case_id="123" xmlns="http://commcarehq.org/case/transaction/v2">
                <referral>
                    <referral_id>456</referral_id>
                    <open>
                        <referral_types>t1 t2</referral_types>
                    </open>
                </referral>
            </case>
            </data>""",
            domain,
        )
        self.assertTrue(xform.is_error)
        self.assertEqual(xform.problem, 'UsesReferrals: Sorry, referrals are no longer supported!')
submit form with a case block that uses referrals
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/couchforms/tests/test_errors.py/CaseProcessingErrorsTest.test_uses_referrals