(self)
return ElementTree.tostring(element, encoding='utf-8')
For a list of cases, return a fixture with all case properties

        <results id="case">
            <case case_id="" case_type="" owner_id="" status="">
                <case_name/>
                <date_opened/>
                <last_modified/>
                <case_property />
                <index>
                    <a12345 case_type="" relationship="" />
                </index>
                <attachment>
                    <a12345 />
                </attachment>
            </case>
            <case>
            ...
            </case>
        </results>

        https://github.com/dimagi/commcare/wiki/casedb
        https://github.com/dimagi/commcare/wiki/fixtures
For a list of cases, return a fixture with all case properties
For a list of cases return a fixture with all case properties
def fixture(self):
        """For a list of cases, return a fixture with all case properties

        <results id="case">
            <case case_id="" case_type="" owner_id="" status="">
                <case_name/>
                <date_opened/>
                <last_modified/>
                <case_property />
                <index>
                    <a12345 case_type="" relationship="" />
                </index>
                <attachment>
                    <a12345 />
                </attachment>
            </case>
            <case>
            ...
            </case>
        </results>

        https://github.com/dimagi/commcare/wiki/casedb
        https://github.com/dimagi/commcare/wiki/fixtures
        """
        element = safe_element("results")
        element.set('id', self.id)

        for case in self.cases:
            element.append(get_casedb_element(case))

        return ElementTree.tostring(element, encoding='utf-8')
def fixture ( self ) : element = safe_element ( "results" ) element . set ( 'id' , self . id ) for case in self . cases : element . append ( get_casedb_element ( case ) ) return ElementTree . tostring ( element , encoding = 'utf-8' )