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
Show 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 @@
import
os
,
sys
,
unittest
,
tempfile
,
cStringIO
from
logging
import
getLogger
import
ZODB
from
OFS.Application
import
Application
,
AppInitializer
,
get_products
import
Zope2.Startup
...
...
@@ -121,7 +123,12 @@ class TestInitialization( unittest.TestCase ):
i
=
self
.
getOne
()
self
.
configure
(
bad_cfg
)
try
:
logger
=
getLogger
(
'Zope.ZODBMountPoint'
)
logger
.
disabled
=
1
status
=
i
.
install_tempfolder_and_sdc
()
finally
:
logger
.
disabled
=
0
self
.
failIf
(
status
)
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
from
AccessControl.SpecialUsers
import
emergency_user
,
nobody
,
system
from
Acquisition
import
Implicit
from
App.config
import
getConfiguration
from
logging
import
getLogger
from
OFS.ObjectManager
import
ObjectManager
from
OFS.SimpleItem
import
SimpleItem
from
zope.app.testing.placelesssetup
import
PlacelessSetup
...
...
@@ -14,6 +15,7 @@ import Products.Five
from
Products.Five
import
zcml
from
Products.Five.eventconfigure
import
setDeprecatedManageAddDelete
logger
=
getLogger
(
'OFS.subscribers'
)
class
FauxRoot
(
Implicit
):
...
...
@@ -284,7 +286,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception
(
self
):
# Test exception behavior in manage_beforeDelete
...
...
@@ -293,7 +299,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug_manager
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
...
...
@@ -303,7 +313,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
try
:
logger
.
disabled
=
1
om
.
_delObject
(
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
...
...
@@ -313,7 +327,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
om
=
self
.
_makeOne
()
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om
.
_setObject
(
ob
.
getId
(),
ob
)
try
:
logger
.
disabled
=
1
self
.
assertRaises
(
DeleteFailed
,
om
.
_delObject
,
ob
.
getId
())
finally
:
logger
.
disabled
=
0
def
test_delObject_exception_debug_deep
(
self
):
# Test exception behavior in manage_beforeDelete in debug mode
...
...
@@ -325,7 +343,11 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
ob
=
ItemForDeletion
(
fail_on_delete
=
True
)
om1
.
_setObject
(
'om2'
,
om2
,
set_owner
=
False
)
om2
.
_setObject
(
ob
.
getId
(),
ob
)
try
:
logger
.
disabled
=
1
self
.
assertRaises
(
DeleteFailed
,
om1
.
_delObject
,
'om2'
)
finally
:
logger
.
disabled
=
0
def
test_hasObject
(
self
):
om
=
self
.
_makeOne
()
...
...
lib/python/OFS/tests/testProductInit.py
View file @
16e6b975
...
...
@@ -170,7 +170,14 @@ class TestProductInit( unittest.TestCase ):
f
.
write
(
'Syntax Error!'
)
f
.
close
()
self
.
configure
(
cfg
)
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
):
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