def assertProcessed(self, model, results, orig, expected_annotations=()):
self.assertEqual(len(results), len(orig))<EOL>for index, item in enumerate(results):<EOL><INDENT>orig_item = orig[index]<EOL>for annotation in expected_annotations:<EOL><INDENT>setattr(orig_item, *annotation)<EOL><DEDENT>for field in model._meta.fields:<EOL><INDENT>self.assertEqual(<EOL>getattr(item, field.attname),<EOL>getattr(orig_item, field.attname)<EOL>)<EOL>self.assertEqual(<EOL>type(getattr(item, field.attname)),<EOL>type(getattr(orig_item, field.attname))<EOL>)<EOL><DEDENT><DEDENT>
Compare the results of a raw query against expected results