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
44d8608e
Commit
44d8608e
authored
Jun 20, 2007
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
parent
2ed7d239
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/OFS/subscribers.py
lib/python/OFS/subscribers.py
+7
-0
lib/python/OFS/tests/testCopySupportEvents.py
lib/python/OFS/tests/testCopySupportEvents.py
+3
-3
No files found.
doc/CHANGES.txt
View file @
44d8608e
...
@@ -8,6 +8,8 @@ Zope Changes
...
@@ -8,6 +8,8 @@ Zope Changes
Bugs fixed
Bugs fixed
- Collector #2307: ObjectCopiedEvent not dispatched to sublocations.
- Fixed ZClass test breakage due to non-pickleability of
- Fixed ZClass test breakage due to non-pickleability of
'zope.interface.Implements'
'zope.interface.Implements'
...
...
lib/python/OFS/subscribers.py
View file @
44d8608e
...
@@ -125,6 +125,13 @@ def dispatchObjectClonedEvent(ob, event):
...
@@ -125,6 +125,13 @@ def dispatchObjectClonedEvent(ob, event):
if
OFS
.
interfaces
.
IObjectManager
.
providedBy
(
ob
):
if
OFS
.
interfaces
.
IObjectManager
.
providedBy
(
ob
):
dispatchToSublocations
(
ob
,
event
)
dispatchToSublocations
(
ob
,
event
)
def
dispatchObjectCopiedEvent
(
ob
,
event
):
"""Multi-subscriber for IItem + IObjectCopiedEvent.
"""
# Dispatch to sublocations
if
OFS
.
interfaces
.
IObjectManager
.
providedBy
(
ob
):
dispatchToSublocations
(
ob
,
event
)
def
callManageAfterAdd
(
ob
,
item
,
container
):
def
callManageAfterAdd
(
ob
,
item
,
container
):
"""Compatibility subscriber for manage_afterAdd.
"""Compatibility subscriber for manage_afterAdd.
...
...
lib/python/OFS/tests/testCopySupportEvents.py
View file @
44d8608e
...
@@ -224,7 +224,7 @@ class TestCopySupportSublocation(EventTest):
...
@@ -224,7 +224,7 @@ class TestCopySupportSublocation(EventTest):
self
.
subfolder
.
manage_clone
(
self
.
folder
.
myfolder
,
'myfolder'
)
self
.
subfolder
.
manage_clone
(
self
.
folder
.
myfolder
,
'myfolder'
)
self
.
assertEqual
(
eventlog
.
called
(),
self
.
assertEqual
(
eventlog
.
called
(),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
#
('mydoc', 'ObjectCopiedEvent'),
(
'mydoc'
,
'ObjectCopiedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
...
@@ -240,7 +240,7 @@ class TestCopySupportSublocation(EventTest):
...
@@ -240,7 +240,7 @@ class TestCopySupportSublocation(EventTest):
self
.
subfolder
.
manage_pasteObjects
(
cb
)
self
.
subfolder
.
manage_pasteObjects
(
cb
)
self
.
assertEqual
(
eventlog
.
called
(),
self
.
assertEqual
(
eventlog
.
called
(),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
#
('mydoc', 'ObjectCopiedEvent'),
(
'mydoc'
,
'ObjectCopiedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
...
@@ -282,7 +282,7 @@ class TestCopySupportSublocation(EventTest):
...
@@ -282,7 +282,7 @@ class TestCopySupportSublocation(EventTest):
self
.
folder
.
myfolder
.
COPY
(
req
,
req
.
RESPONSE
)
self
.
folder
.
myfolder
.
COPY
(
req
,
req
.
RESPONSE
)
self
.
assertEqual
(
eventlog
.
called
(),
self
.
assertEqual
(
eventlog
.
called
(),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
[(
'myfolder'
,
'ObjectCopiedEvent'
),
#
('mydoc', 'ObjectCopiedEvent'),
(
'mydoc'
,
'ObjectCopiedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'mydoc'
,
'ObjectWillBeAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
(
'myfolder'
,
'ObjectAddedEvent'
),
...
...
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