'Test basic permissions cache get / set / clear low-level api'

def test_basic_permissions(self):

    cached_permissions = get_permission_cache(self.user_normal, 'change_page')
    self.assertIsNone(cached_permissions)
    set_permission_cache(self.user_normal, 'change_page', [self.home_page.id])
    cached_permissions = get_permission_cache(self.user_normal, 'change_page')
    self.assertEqual(cached_permissions, [self.home_page.id])
    clear_user_permission_cache(self.user_normal)
    cached_permissions = get_permission_cache(self.user_normal, 'change_page')
    self.assertIsNone(cached_permissions)
