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
a616202f
Commit
a616202f
authored
Apr 28, 2008
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests that the Z3 IWriteLock interface is present.
parent
316abb73
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
0 deletions
+86
-0
lib/python/OFS/tests/test_DTMLDocument.py
lib/python/OFS/tests/test_DTMLDocument.py
+24
-0
lib/python/OFS/tests/test_DTMLMethod.py
lib/python/OFS/tests/test_DTMLMethod.py
+24
-0
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
...thon/Products/PageTemplates/tests/testZopePageTemplate.py
+5
-0
lib/python/Products/PythonScripts/tests/testPythonScript.py
lib/python/Products/PythonScripts/tests/testPythonScript.py
+8
-0
lib/python/Products/ZSQLMethods/tests/__init__.py
lib/python/Products/ZSQLMethods/tests/__init__.py
+1
-0
lib/python/Products/ZSQLMethods/tests/test_SQL.py
lib/python/Products/ZSQLMethods/tests/test_SQL.py
+24
-0
No files found.
lib/python/OFS/tests/test_DTMLDocument.py
0 → 100644
View file @
a616202f
import
unittest
class
DTMLDocumentTests
(
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
OFS.DTMLDocument
import
DTMLDocument
return
DTMLDocument
def
_makeOne
(
self
,
*
args
,
**
kw
):
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
def
test_class_conforms_to_IWriteLock
(
self
):
from
zope.interface.verify
import
verifyClass
from
webdav.interfaces
import
IWriteLock
verifyClass
(
IWriteLock
,
self
.
_getTargetClass
())
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
DTMLDocumentTests
),
))
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'test_suite'
)
lib/python/OFS/tests/test_DTMLMethod.py
0 → 100644
View file @
a616202f
import
unittest
class
DTMLMethodTests
(
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
OFS.DTMLMethod
import
DTMLMethod
return
DTMLMethod
def
_makeOne
(
self
,
*
args
,
**
kw
):
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
def
test_class_conforms_to_IWriteLock
(
self
):
from
zope.interface.verify
import
verifyClass
from
webdav.interfaces
import
IWriteLock
verifyClass
(
IWriteLock
,
self
.
_getTargetClass
())
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
DTMLMethodTests
),
))
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'test_suite'
)
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
View file @
a616202f
...
@@ -154,6 +154,11 @@ class ZPTUnicodeEncodingConflictResolution(ZopeTestCase):
...
@@ -154,6 +154,11 @@ class ZPTUnicodeEncodingConflictResolution(ZopeTestCase):
class
ZopePageTemplateFileTests
(
ZopeTestCase
):
class
ZopePageTemplateFileTests
(
ZopeTestCase
):
def
test_class_conforms_to_IWriteLock
(
self
):
from
zope.interface.verify
import
verifyClass
from
webdav.interfaces
import
IWriteLock
verifyClass
(
IWriteLock
,
ZopePageTemplate
)
def
testPT_RenderWithAscii
(
self
):
def
testPT_RenderWithAscii
(
self
):
manage_addPageTemplate
(
self
.
app
,
'test'
,
text
=
ascii_str
,
encoding
=
'ascii'
)
manage_addPageTemplate
(
self
.
app
,
'test'
,
text
=
ascii_str
,
encoding
=
'ascii'
)
zpt
=
self
.
app
[
'test'
]
zpt
=
self
.
app
[
'test'
]
...
...
lib/python/Products/PythonScripts/tests/testPythonScript.py
View file @
a616202f
...
@@ -296,11 +296,19 @@ class TestPythonScriptGlobals(PythonScriptTestBase, WarningInterceptor):
...
@@ -296,11 +296,19 @@ class TestPythonScriptGlobals(PythonScriptTestBase, WarningInterceptor):
self
.
assertEqual
(
f
(),
[
0
])
self
.
assertEqual
(
f
(),
[
0
])
self
.
_free_warning_output
()
self
.
_free_warning_output
()
class
PythonScriptInterfaceConformanceTests
(
unittest
.
TestCase
):
def
test_class_conforms_to_IWriteLock
(
self
):
from
zope.interface.verify
import
verifyClass
from
webdav.interfaces
import
IWriteLock
verifyClass
(
IWriteLock
,
PythonScript
)
def
test_suite
():
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptNoAq
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptNoAq
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptErrors
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptErrors
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptGlobals
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestPythonScriptGlobals
))
suite
.
addTest
(
unittest
.
makeSuite
(
PythonScriptInterfaceConformanceTests
))
return
suite
return
suite
...
...
lib/python/Products/ZSQLMethods/tests/__init__.py
0 → 100644
View file @
a616202f
# Unit tests for ZSQLMethods
lib/python/Products/ZSQLMethods/tests/test_SQL.py
0 → 100644
View file @
a616202f
import
unittest
class
SQLMethodTests
(
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
from
Products.ZSQLMethods.SQL
import
SQL
return
SQL
def
_makeOne
(
self
,
*
args
,
**
kw
):
return
self
.
_getTargetClass
()(
*
args
,
**
kw
)
def
test_class_conforms_to_IWriteLock
(
self
):
from
zope.interface.verify
import
verifyClass
from
webdav.interfaces
import
IWriteLock
verifyClass
(
IWriteLock
,
self
.
_getTargetClass
())
def
test_suite
():
return
unittest
.
TestSuite
((
unittest
.
makeSuite
(
SQLMethodTests
),
))
if
__name__
==
'__main__'
:
unittest
.
main
(
defaultTest
=
'test_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