def _mangle_prefix_result(self, res):
if isinstance(res, list):<EOL><INDENT>for p in res:<EOL><INDENT>self.assertIn('<STR_LIT>', p)<EOL>self.assertIn('<STR_LIT>', p)<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL><DEDENT><DEDENT>elif isinstance(res, dict) and '<STR_LIT:result>' in res:<EOL><INDENT>for p in res['<STR_LIT:result>']:<EOL><INDENT>self.assertIn('<STR_LIT>', p)<EOL>self.assertIn('<STR_LIT>', p)<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL><DEDENT><DEDENT>elif isinstance(res, dict):<EOL><INDENT>self.assertIn('<STR_LIT>', p)<EOL>self.assertIn('<STR_LIT>', p)<EOL>del(p['<STR_LIT>'])<EOL>del(p['<STR_LIT>'])<EOL>del(res['<STR_LIT>'])<EOL>del(res['<STR_LIT>'])<EOL>del(res['<STR_LIT>'])<EOL><DEDENT>return res<EOL>
Mangle prefix result for easier testing

            We can never predict the values of things like the ID (okay, that
            one is actually kind of doable) or the added and last_modified
            timestamp. This function will make sure the values are present but
            then strip them to make it easier to test against an expected
            result.