'Check for exception if record not found'

def testNotDuplicateFoundError(self):

    db = current.db
    s3db = current.s3db
    deployment_settings = current.deployment_settings
    with self.assertRaises(KeyError):
        self.resource.merge(self.id1, 0)
    ptable = s3db.pr_person
    query = ptable._id.belongs((self.id1, self.id2))
    rows = db(query).select(ptable._id, limitby=(0, 2))
    self.assertEqual(len(rows), 0)
