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
f765bbe5
Commit
f765bbe5
authored
23 years ago
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Repair tests, adding dummy user for _setObject's sake.
parent
e46e090f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
lib/python/Products/ZCatalog/tests/testCatalog.py
lib/python/Products/ZCatalog/tests/testCatalog.py
+14
-1
No files found.
lib/python/Products/ZCatalog/tests/testCatalog.py
View file @
f765bbe5
...
...
@@ -24,6 +24,17 @@ import whrandom,string, unittest
# Stuff of Chris
################################################################################
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
noSecurityManager
class
DummyUser
:
def
__init__
(
self
,
name
):
self
.
_name
=
name
def
getUserName
(
self
):
return
self
.
_name
class
CatalogBase
:
def
setUp
(
self
):
...
...
@@ -34,7 +45,7 @@ class CatalogBase:
def
tearDown
(
self
):
self
.
_vocabulary
=
self
.
_catalog
=
None
class
TestAddDelColumn
(
unittest
.
TestCase
,
CatalogB
ase
):
class
TestAddDelColumn
(
CatalogBase
,
unittest
.
TestC
ase
):
def
testAdd
(
self
):
self
.
_catalog
.
addColumn
(
'id'
)
assert
self
.
_catalog
.
schema
.
has_key
(
'id'
)
==
1
,
'add column failed'
...
...
@@ -101,7 +112,9 @@ class TestZCatalogObject(unittest.TestCase):
def
testInstantiateWithoutVocab
(
self
):
v
=
Vocabulary
.
Vocabulary
(
'Vocabulary'
,
'Vocabulary'
,
globbing
=
1
)
newSecurityManager
(
None
,
DummyUser
(
'phred'
)
)
zc
=
ZCatalog
.
ZCatalog
(
'acatalog'
)
noSecurityManager
()
assert
hasattr
(
zc
,
'Vocabulary'
)
assert
zc
.
getVocabulary
().
__class__
==
v
.
__class__
...
...
This diff is collapsed.
Click to expand it.
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