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
8cd374c3
Commit
8cd374c3
authored
Aug 01, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move test helper classes to the top of the module, more meaningful name for TestRS
parent
57b1615f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
35 deletions
+35
-35
src/Products/ZCatalog/tests/test_catalog.py
src/Products/ZCatalog/tests/test_catalog.py
+35
-35
No files found.
src/Products/ZCatalog/tests/test_catalog.py
View file @
8cd374c3
...
...
@@ -55,6 +55,39 @@ def sort(iterable):
return
L
class
zdummy
(
ExtensionClass
.
Base
):
def
__init__
(
self
,
num
):
self
.
num
=
num
def
title
(
self
):
return
'%d'
%
self
.
num
class
dummy
(
ExtensionClass
.
Base
):
att1
=
'att1'
att2
=
'att2'
att3
=
[
'att3'
]
def
__init__
(
self
,
num
):
self
.
num
=
num
def
col1
(
self
):
return
'col1'
def
col2
(
self
):
return
'col2'
def
col3
(
self
):
return
[
'col3'
]
class
objRS
(
ExtensionClass
.
Base
):
def
__init__
(
self
,
num
):
self
.
number
=
num
class
CatalogBase
:
def
setUp
(
self
):
...
...
@@ -129,33 +162,6 @@ class TestAddDelIndexes(CatalogBase, unittest.TestCase):
'del index failed'
)
class
zdummy
(
ExtensionClass
.
Base
):
def
__init__
(
self
,
num
):
self
.
num
=
num
def
title
(
self
):
return
'%d'
%
self
.
num
class
dummy
(
ExtensionClass
.
Base
):
att1
=
'att1'
att2
=
'att2'
att3
=
[
'att3'
]
def
__init__
(
self
,
num
):
self
.
num
=
num
def
col1
(
self
):
return
'col1'
def
col2
(
self
):
return
'col2'
def
col3
(
self
):
return
[
'col3'
]
class
TestCatalogObject
(
unittest
.
TestCase
):
upper
=
1000
...
...
@@ -391,13 +397,7 @@ class TestCatalogObject(unittest.TestCase):
self
.
assertEqual
(
brain
.
att1
,
'foobar'
)
class
objRS
(
ExtensionClass
.
Base
):
def
__init__
(
self
,
num
):
self
.
number
=
num
class
TestRS
(
unittest
.
TestCase
):
class
TestRangeSearch
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
_catalog
=
Catalog
()
...
...
@@ -518,6 +518,6 @@ def test_suite():
suite
.
addTest
(
unittest
.
makeSuite
(
TestAddDelColumn
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestAddDelIndexes
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestCatalogObject
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestR
S
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestR
angeSearch
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestMerge
))
return
suite
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