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))
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)