Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikolaï Krol
erp5
Commits
33dd37ef
Commit
33dd37ef
authored
Jul 05, 2011
by
Lucas Carvalho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the tests with latest changes.
parent
03fed990
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
+14
-5
bt5/erp5_web_shadir/bt/revision
bt5/erp5_web_shadir/bt/revision
+1
-1
No files found.
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
View file @
33dd37ef
...
...
@@ -28,6 +28,7 @@
##############################################################################
import
httplib
import
json
import
transaction
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
...
@@ -60,11 +61,13 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
data_file
.
seek
(
0
)
self
.
portal
.
changeSkin
(
'SHADIR'
)
self
.
shadir
.
REQUEST
.
set
(
'method'
,
'POST'
)
self
.
shadir
.
REQUEST
.
set
(
'Content-Type'
,
'application/json'
)
self
.
shadir
.
REQUEST
.
_file
=
data_file
self
.
shadir
.
WebSection_getDocumentValue
(
key
)
path
=
self
.
shadir
.
getPath
()
response
=
self
.
publish
(
'%s/%s'
%
(
path
,
key
),
request_method
=
'PUT'
,
stdin
=
data_file
,
basic
=
'ERP5TypeTestCase:'
)
self
.
stepTic
()
self
.
assertEqual
(
response
.
getStatus
(),
httplib
.
CREATED
)
finally
:
data_file
.
close
()
...
...
@@ -88,6 +91,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
'document_module'
,):
folder
=
self
.
portal
[
module
]
folder
.
manage_delObjects
(
list
(
folder
.
objectIds
()))
self
.
portal
.
portal_caches
.
clearAllCache
()
transaction
.
commit
()
self
.
tic
()
...
...
@@ -108,8 +112,10 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self
.
assertEquals
(
self
.
sha512sum
,
document
.
getReference
())
self
.
assertEquals
(
self
.
data
,
document
.
getData
())
self
.
assertEquals
(
data_set
,
document
.
getFollowUpValue
())
self
.
assertEquals
(
self
.
expiration_date
,
document
.
getExpirationDate
())
self
.
assertEquals
(
str
(
self
.
expiration_date
),
str
(
document
.
getExpirationDate
()))
self
.
assertEquals
(
'application/json'
,
document
.
getContentType
())
self
.
assertEquals
(
'Published'
,
document
.
getValidationStateTitle
())
def
test_get_information
(
self
):
"""
...
...
@@ -132,9 +138,12 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
self
.
assertEquals
(
0
,
len
(
self
.
portal
.
data_set_module
))
self
.
assertEquals
(
0
,
len
(
self
.
portal
.
document_module
))
self
.
postInformation
()
for
x
in
xrange
(
10
):
self
.
postInformation
()
self
.
assertEquals
(
1
,
len
(
self
.
portal
.
data_set_module
))
data_set
=
self
.
portal
.
data_set_module
.
contentValues
()[
0
]
self
.
assertEquals
(
self
.
key
,
data_set
.
getReference
())
...
...
bt5/erp5_web_shadir/bt/revision
View file @
33dd37ef
43
\ No newline at end of file
44
\ No newline at end of file
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