'Sanity check for access.has_perm_or_owns.'

def test_util_has_perm_or_owns_sanity(self):

    from kitsune.forums.tests import ThreadFactory
    me = UserFactory()
    my_t = ThreadFactory(creator=me)
    other_t = ThreadFactory()
    perm = 'forums_forum.thread_edit_forum'
    allowed = access.has_perm_or_owns(me, perm, my_t, my_t.forum)
    eq_(allowed, True)
    allowed = access.has_perm_or_owns(me, perm, other_t, other_t.forum)
    eq_(allowed, False)
