Esempio n. 1
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.component = self.component
     self.assertIn('component=Test/Test', force_text(acl))
     acl.component = None
     acl.project = self.project
     self.assertIn('project=Test', force_text(acl))
Esempio n. 2
0
 def test_acl_clean(self):
     acl = GroupACL()
     self.assertRaises(ValidationError, acl.clean)
     acl.project = self.project
     acl.component = self.component
     acl.save()
     self.assertIsNone(acl.project)