Пример #1
0
 def test_acl_clean(self):
     acl = GroupACL()
     self.assertRaises(ValidationError, acl.clean)
     acl.project = self.project
     acl.subproject = self.subproject
     acl.clean()
     self.assertIsNone(acl.project)
Пример #2
0
 def test_acl_clean(self):
     acl = GroupACL()
     self.assertRaises(
         ValidationError,
         acl.clean
     )
     acl.project = self.project
     acl.subproject = self.subproject
     acl.clean()
     self.assertIsNone(acl.project)
Пример #3
0
 def test_acl_str(self):
     acl = GroupACL()
     self.assertIn('unspecified', force_text(acl))
     acl.language = self.language
     self.assertIn('language=English', force_text(acl))
     acl.subproject = self.subproject
     self.assertIn('subproject=Test/Test', force_text(acl))
     acl.subproject = None
     acl.project = self.project
     self.assertIn('project=Test', force_text(acl))
Пример #4
0
 def test_acl_str(self):
     acl = GroupACL()
     self.assertIn(
         'unspecified', force_text(acl)
     )
     acl.language = self.language
     self.assertIn(
         'language=English', force_text(acl)
     )
     acl.subproject = self.subproject
     self.assertIn(
         'subproject=Test/Test', force_text(acl)
     )
     acl.subproject = None
     acl.project = self.project
     self.assertIn(
         'project=Test', force_text(acl)
     )