def tags_eq(tagged_object, tag_names):
 eq_(sorted([t.name for t in tagged_object.tags.all()]), sorted(tag_names))

def tags_eq ( tagged_object , tag_names ) : eq_ ( sorted ( [ t . name for t in tagged_object . tags . all ( ) ] ) , sorted ( tag_names ) )
assert that the names of the tags on tagged_object are tag_names .