'Test merge where original record lacks SEs'

def testMergeMissingOriginalSE(self):

    assertEqual = self.assertEqual
    assertNotEqual = self.assertNotEqual
    assertTrue = self.assertTrue
    resource = self.resource
    get_records = self.get_records
    (org1, org2) = get_records()
    success = current.s3db.delete_super(resource.table, org1)
    assertTrue(success)
    (org1, org2) = get_records()
    assertEqual(org1.pe_id, None)
    success = resource.merge(self.id1, self.id2)
    assertTrue(success)
    (org1, org2) = get_records()
    assertNotEqual(org1, None)
    assertNotEqual(org2, None)
    self.assertFalse(org1.deleted)
    assertTrue(org2.deleted)
    assertEqual(str(self.id1), str(org2.deleted_rb))
    assertNotEqual(org1.pe_id, None)
