def testMergeRealms(self):

        assertEqual = self.assertEqual
        assertTrue = self.assertTrue

        org1, org2 = self.get_records()

        s3db = current.s3db
        org1_pe_id = s3db.pr_get_pe_id(org1)
        org2_pe_id = s3db.pr_get_pe_id(org2)

        person = Storage(first_name="Nxthga",
                         realm_entity=org2_pe_id)
        ptable = s3db.pr_person
        person_id = ptable.insert(**person)

        person = ptable[person_id]
        assertEqual(person.realm_entity, org2_pe_id)

        success = self.resource.merge(self.id1, self.id2)
        assertTrue(success)

        person = ptable[person_id]
        assertEqual(person.realm_entity, org1_pe_id)

    # -------------------------------------------------------------------------
Write a Agilent/Varian binary (fid) file using mimimal amounts of memory.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3resource.py/MergeOrganisationsTests.testMergeRealms--crossover with--dataset/ETHPy150Open jjhelmus/nmrglue/nmrglue/fileio/varian.py/write_fid_lowmem