'Test permission relationship
Test whether we check for permission relationship, independent
of whether the permission is actually assigned to anyone.'

def test_perm_is_defined_on(self):

    from kitsune.forums.tests import ForumFactory, RestrictedForumFactory
    f1 = RestrictedForumFactory()
    f2 = ForumFactory()
    perm = 'forums_forum.view_in_forum'
    assert access.perm_is_defined_on(perm, f1)
    assert (not access.perm_is_defined_on(perm, f2))
