Even in tests, I think it's best to put stuff like this in an interpolated string since it's easier to modify/read the xml that's there. See https://github.com/dimagi/commcare-hq/blob/commtrack-makethehurtingstop/corehq/apps/commtrack/tests/data/balances.py#L13