コード例 #1
0
 def test_category_data_not_shown_for_missing_resourcebase_permissions(self):
     """
     Test that a user without view permissions of a resource base does not see
     ISO category format data of the ISO category
     """
     categories = get_visibile_resources(self.user)
     self.assertEqual(categories['iso_formats'].count(), 0)
コード例 #2
0
ファイル: tests.py プロジェクト: iobis/geonode
 def test_category_data_shown_for_with_resourcebase_permissions(self):
     """
     Test that a user with view permissions of a resource base can see
     ISO format data of the ISO category
     """
     assign_perm('view_resourcebase', self.user, self.rb)
     categories = get_visibile_resources(self.user)
     self.assertEqual(categories['iso_formats'].count(), 1)