

def assertNoMissingXmlnss(self):
    submissions = XFormInstance.get_db().view('couchforms/by_xmlns', key='undefined', include_docs=False, reduce=False).all()
    self.assertEqual(submissions, [])
    saved_apps = Application.get_db().view('app_manager/saved_app', include_docs=True)
    apps = [get_correct_app_class(row['doc']).wrap(row['doc']) for row in saved_apps]
    for app in apps:
        for form in app.get_forms():
            self.assertEqual(form.source.count('xmlns="undefined"'), 0)
            self.assertNotEqual(form.xmlns, 'undefined')

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/cleanup/tests/test_fix_forms_with_missing_xmlns.py TestFixFormsWithMissingXmlns.assertNoMissingXmlnss/original