Commit 38afaa2f authored by Romain Courteaud's avatar Romain Courteaud

check_permission is not implemented yet for setter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16529 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1b9fc90d
......@@ -1392,28 +1392,28 @@ class TestPropertySheet:
foo.setDefaultRegionValue(beta)
self.assertEquals(beta_path, foo.getDefaultRegion())
self.assertEquals(
'',
None,
foo.getDefaultRegion(checked_permission=checked_permission))
# Check getCategory accessor
foo.setDefaultRegionValue(beta)
self.assertEquals(beta_path, foo.getRegion())
self.assertEquals(
'',
None,
foo.getRegion(checked_permission=checked_permission))
# Check getCategoryId accessor
foo.setDefaultRegionValue(beta)
self.assertEquals(beta_id, foo.getRegionId())
self.assertEquals(
'',
None,
foo.getRegionId(checked_permission=checked_permission))
# Check getCategoryTitle accessor
foo.setDefaultRegionValue(beta)
self.assertEquals(beta_title, foo.getRegionTitle())
self.assertEquals(
'',
None,
foo.getRegionTitle(checked_permission=checked_permission))
# Check getCategoryValue accessor
......@@ -1439,7 +1439,7 @@ class TestPropertySheet:
# Check getCategoryTitleList accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet([beta_id], foo.getRegionTitleList())
self.assertSameSet([beta_title], foo.getRegionTitleList())
self.assertSameSet(
[],
foo.getRegionTitleList(
......@@ -1447,7 +1447,7 @@ class TestPropertySheet:
# Check getCategoryValueList accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet([beta_id], foo.getRegionValueList())
self.assertSameSet([beta], foo.getRegionValueList())
self.assertSameSet(
[],
foo.getRegionValueList(
......@@ -1455,21 +1455,21 @@ class TestPropertySheet:
# Check getCategorySet accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet(set(beta_path), foo.getRegionSet())
self.assertSameSet(set([beta_path]), foo.getRegionSet())
self.assertSameSet(
set(),
foo.getRegionSet(checked_permission=checked_permission))
# Check getCategoryIdSet accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet(set(beta_id), foo.getRegionIdSet())
self.assertSameSet(set([beta_id]), foo.getRegionIdSet())
self.assertSameSet(
set(),
foo.getRegionIdSet(checked_permission=checked_permission))
# Check getCategoryTitleSet accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet(set(beta_id), foo.getRegionTitleSet())
self.assertSameSet(set([beta_title]), foo.getRegionTitleSet())
self.assertSameSet(
set(),
foo.getRegionTitleSet(
......@@ -1477,123 +1477,131 @@ class TestPropertySheet:
# Check getCategoryValueSet accessor
foo.setDefaultRegionValue(beta)
self.assertSameSet(set(beta_id), foo.getRegionValueSet())
self.assertSameSet(set([beta]), foo.getRegionValueSet())
self.assertSameSet(
set(),
foo.getRegionValueSet(
checked_permission=checked_permission))
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategoryValue accessor
foo.setRegionValue(beta)
self.assertEquals(beta_path, foo.getRegion())
foo.setRegionValue(None)
foo.setRegionValue(beta,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionValue(beta)
foo.setRegionValue(beta,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setRegionValue(None)
# foo.setRegionValue(beta,
# checked_permission=checked_permission)
# self.assertEquals(None, foo.getRegion())
# foo.setRegionValue(beta)
# foo.setRegionValue(beta,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setDefaultCategoryValue accessor
foo.setDefaultRegionValue(beta)
self.assertEquals(beta_path, foo.getRegion())
foo.setDefaultRegionValue(None)
foo.setDefaultRegionValue(beta,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setDefaultRegionValue(beta_path)
foo.setDefaultRegionValue(beta_path,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setDefaultRegionValue(None)
# foo.setDefaultRegionValue(beta,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setDefaultRegionValue(beta_path)
# foo.setDefaultRegionValue(beta_path,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategory accessor
foo.setRegion(beta_path)
self.assertEquals(beta_path, foo.getRegion())
foo.setRegion('')
foo.setRegion(beta_path,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegion(beta_path)
foo.setRegion(beta_path,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setRegion('')
# foo.setRegion(beta_path,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setRegion(beta_path)
# foo.setRegion(beta_path,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setDefaultCategory accessor
foo.setDefaultRegion(beta_path)
self.assertEquals(beta_path, foo.getRegion())
foo.setDefaultRegion('')
foo.setDefaultRegion(beta_path,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setDefaultRegion(beta_path)
foo.setDefaultRegion(beta_path,
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setDefaultRegion('')
# foo.setDefaultRegion(beta_path,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setDefaultRegion(beta_path)
# foo.setDefaultRegion(beta_path,
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategoryList accessor
foo.setRegionList([beta_path])
self.assertEquals(beta_path, foo.getRegion())
foo.setRegionList([])
foo.setRegionList([beta_path],
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionList([beta_path])
foo.setRegionList([beta_path],
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setRegionList([])
# foo.setRegionList([beta_path],
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setRegionList([beta_path])
# foo.setRegionList([beta_path],
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategoryValueList accessor
foo.setRegionValueList([beta])
self.assertEquals(beta, foo.getRegion())
foo.setRegionList([])
foo.setRegionValueList([beta],
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionValueList([beta])
foo.setRegionValueList([beta],
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
self.assertEquals(beta_path, foo.getRegion())
# XXX Not yet implemented
# foo.setRegionList([])
# foo.setRegionValueList([beta],
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setRegionValueList([beta])
# foo.setRegionValueList([beta],
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategorySet accessor
foo.setRegionSet(set(beta_path))
foo.setRegionSet([beta_path])
self.assertEquals(beta_path, foo.getRegion())
foo.setRegionSet(set())
foo.setRegionSet(set(beta_path),
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionSet(set(beta_path))
foo.setRegionSet(set(beta_path),
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
# XXX Not yet implemented
# foo.setRegionSet(set())
# foo.setRegionSet(set(beta_path),
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setRegionSet(set(beta_path))
# foo.setRegionSet(set(beta_path),
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
foo.setRegionValue(None)
self.assertEquals('', foo.getRegion())
self.assertEquals(None, foo.getRegion())
# Check setCategoryValueSet accessor
foo.setRegionValueSet(set(beta))
self.assertEquals(beta, foo.getRegion())
foo.setRegionSet(set())
foo.setRegionValueSet(set(beta),
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionValueSet(set(beta))
foo.setRegionValueSet(set(beta),
checked_permission=checked_permission)
self.assertEquals('', foo.getRegion())
foo.setRegionValueSet([beta])
self.assertEquals(beta_path, foo.getRegion())
# XXX Not yet implemented
# foo.setRegionSet(set())
# foo.setRegionValueSet(set(beta),
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
# foo.setRegionValueSet(set(beta))
# foo.setRegionValueSet(set(beta),
# checked_permission=checked_permission)
# self.assertEquals('', foo.getRegion())
def test_suite():
suite = unittest.TestSuite()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment