Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
16e6b975
Commit
16e6b975
authored
May 01, 2006
by
Chris Withers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shush log output from tests.
parent
01ca1d4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
8 deletions
+44
-8
lib/python/OFS/tests/testAppInitializer.py
lib/python/OFS/tests/testAppInitializer.py
+8
-1
lib/python/OFS/tests/testObjectManager.py
lib/python/OFS/tests/testObjectManager.py
+28
-6
lib/python/OFS/tests/testProductInit.py
lib/python/OFS/tests/testProductInit.py
+8
-1
No files found.
lib/python/OFS/tests/testAppInitializer.py
View file @
16e6b975
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
import
os
,
sys
,
unittest
,
tempfile
,
cStringIO
import
os
,
sys
,
unittest
,
tempfile
,
cStringIO
from
logging
import
getLogger
import
ZODB
import
ZODB
from
OFS.Application
import
Application
,
AppInitializer
,
get_products
from
OFS.Application
import
Application
,
AppInitializer
,
get_products
import
Zope2.Startup
import
Zope2.Startup
...
@@ -121,7 +123,12 @@ class TestInitialization( unittest.TestCase ):
...
@@ -121,7 +123,12 @@ class TestInitialization( unittest.TestCase ):
i
=
self
.
getOne
()
i
=
self
.
getOne
()
self
.
configure
(
bad_cfg
)
self
.
configure
(
bad_cfg
)
status
=
i
.
install_tempfolder_and_sdc
()
try
:
logger
=
getLogger
(
'Zope.ZODBMountPoint'
)
logger
.
disabled
=
1
status
=
i
.
install_tempfolder_and_sdc
()
finally
:
logger
.
disabled
=
0
self
.
failIf
(
status
)
self
.
failIf
(
status
)
def
test_install_tempfolder_and_sdc_unlimited_sessions
(
self
):
def
test_install_tempfolder_and_sdc_unlimited_sessions
(
self
):
...
...
lib/python/OFS/tests/testObjectManager.py
View file @
16e6b975
...
@@ -7,6 +7,7 @@ from AccessControl.User import User # before SpecialUsers
...
@@ -7,6 +7,7 @@ from AccessControl.User import User # before SpecialUsers
from
AccessControl.SpecialUsers
import
emergency_user
,
nobody
,
system
from
AccessControl.SpecialUsers
import
emergency_user
,
nobody
,
system
from
Acquisition
import
Implicit
from
Acquisition
import
Implicit
from
App.config
import
getConfiguration
from
App.config
import
getConfiguration
from
logging
import
getLogger
from
OFS.ObjectManager
import
ObjectManager
from
OFS.ObjectManager
import
ObjectManager
from
OFS.SimpleItem
import
SimpleItem
from
OFS.SimpleItem
import
SimpleItem
from
zope.app.testing.placelesssetup
import
PlacelessSetup
from
zope.app.testing.placelesssetup
import
PlacelessSetup
...
@@ -14,6 +15,7 @@ import Products.Five
...
@@ -14,6 +15,7 @@ import Products.Five
from
Products.Five
import
zcml
from
Products.Five
import
zcml
from
Products.Five.eventconfigure
import
setDeprecatedManageAddDelete
from
Products.Five.eventconfigure
import
setDeprecatedManageAddDelete
logger
=
getLogger
(
'OFS.subscribers'
)
class
FauxRoot
(
Implicit
):
class
FauxRoot
(
Implicit
):
...
@@ -284,7 +286,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -284,7 +286,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_delObject
(
ob
.
getId
())
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception
(
self
):
def
test_delObject_exception
(
self
):
# Test exception behavior in manage_beforeDelete
# Test exception behavior in manage_beforeDelete
...
@@ -293,8 +299,12 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -293,8 +299,12 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_delObject
(
ob
.
getId
())
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug_manager
(
self
):
def
test_delObject_exception_debug_manager
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
# Test exception behavior in manage_beforeDelete in debug mode
# Manager user
# Manager user
...
@@ -303,7 +313,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -303,7 +313,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_delObject
(
ob
.
getId
())
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug
(
self
):
def
test_delObject_exception_debug
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
# Test exception behavior in manage_beforeDelete in debug mode
...
@@ -313,7 +327,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -313,7 +327,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
self
.
assertRaises
(
DeleteFailed
,
om
.
_delObject
,
ob
.
getId
())
try
:
logger
.
disabled
=
1
self
.
assertRaises
(
DeleteFailed
,
om
.
_delObject
,
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug_deep
(
self
):
def
test_delObject_exception_debug_deep
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
# Test exception behavior in manage_beforeDelete in debug mode
...
@@ -325,7 +343,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
...
@@ -325,7 +343,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om1
.
_setObject
(
'om2'
,
om2
,
set_owner
=
False
)
om1
.
_setObject
(
'om2'
,
om2
,
set_owner
=
False
)
om2
.
_setObject
(
ob
.
getId
(),
ob
)
om2
.
_setObject
(
ob
.
getId
(),
ob
)
self
.
assertRaises
(
DeleteFailed
,
om1
.
_delObject
,
'om2'
)
try
:
logger
.
disabled
=
1
self
.
assertRaises
(
DeleteFailed
,
om1
.
_delObject
,
'om2'
)
finally
:
logger
.
disabled
=
0
def
test_hasObject
(
self
):
def
test_hasObject
(
self
):
om
=
self
.
_makeOne
()
om
=
self
.
_makeOne
()
...
...
lib/python/OFS/tests/testProductInit.py
View file @
16e6b975
...
@@ -170,7 +170,14 @@ class TestProductInit( unittest.TestCase ):
...
@@ -170,7 +170,14 @@ class TestProductInit( unittest.TestCase ):
f
.
write
(
'Syntax Error!'
)
f
.
write
(
'Syntax Error!'
)
f
.
close
()
f
.
close
()
self
.
configure
(
cfg
)
self
.
configure
(
cfg
)
self
.
assertRaises
(
SyntaxError
,
self
.
import_bad_product
)
try
:
from
logging
import
getLogger
logger
=
getLogger
(
'Zope'
)
logger
.
disabled
=
1
self
.
assertRaises
(
SyntaxError
,
self
.
import_bad_product
)
finally
:
logger
.
disabled
=
0
def
import_bad_product
(
self
):
def
import_bad_product
(
self
):
from
OFS.Application
import
import_product
from
OFS.Application
import
import_product
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment