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
341a2a5a
Commit
341a2a5a
authored
Jul 29, 2007
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use aq_get if you want to acquire and have a signature like getattr
parent
04a84039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/python/Products/Five/site/tests/test_utility.py
lib/python/Products/Five/site/tests/test_utility.py
+4
-4
No files found.
lib/python/Products/Five/site/tests/test_utility.py
View file @
341a2a5a
...
...
@@ -283,17 +283,17 @@ class LocalUtilityServiceTest(ZopeTestCase.ZopeTestCase):
# let's see if we can acquire something all the way from the
# root (Application) object; we need to be careful to choose
# something that's only available from the root object
from
Acquisition
import
aq_
acquire
from
Acquisition
import
aq_
get
dummy
=
zapi
.
getUtility
(
IDummyUtility
)
acquired
=
aq_
acquire
(
dummy
,
'ZopeAttributionButton'
,
None
)
acquired
=
aq_
get
(
dummy
,
'ZopeAttributionButton'
,
None
)
self
.
failUnless
(
acquired
is
not
None
)
name
,
dummy
=
zapi
.
getUtilitiesFor
(
IDummyUtility
).
next
()
acquired
=
aq_
acquire
(
dummy
,
'ZopeAttributionButton'
,
None
)
acquired
=
aq_
get
(
dummy
,
'ZopeAttributionButton'
,
None
)
self
.
failUnless
(
acquired
is
not
None
)
dummy
=
zapi
.
getAllUtilitiesRegisteredFor
(
IDummyUtility
).
next
()
acquired
=
aq_
acquire
(
dummy
,
'ZopeAttributionButton'
,
None
)
acquired
=
aq_
get
(
dummy
,
'ZopeAttributionButton'
,
None
)
self
.
failUnless
(
acquired
is
not
None
)
def
test_getNextUtility
(
self
):
...
...
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