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
Laurent S
erp5
Commits
8414795b
Commit
8414795b
authored
Sep 01, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check result in postInformation method.
parent
107a3ebf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
23 deletions
+9
-23
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
bt5/erp5_web_shadir/TestTemplateItem/testShaDir.py
+8
-22
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 @
8414795b
...
...
@@ -62,7 +62,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
data
=
result
.
read
()
finally
:
connection
.
close
()
return
result
.
status
,
data
self
.
assertEqual
(
result
.
status
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
def
getInformation
(
self
,
key
=
None
):
"""
...
...
@@ -96,11 +97,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
Check if posting information is working.
"""
result
,
data
=
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
...
...
@@ -143,17 +140,11 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
Check if posting information is working.
"""
result
,
data
=
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
result
,
data
=
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
...
...
@@ -176,9 +167,9 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
check if return the temp document with text content.
"""
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
result
,
data
=
self
.
getInformation
()
self
.
assertEqual
(
result
,
httplib
.
OK
)
information_list
=
json
.
loads
(
data
)
...
...
@@ -197,7 +188,6 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
This relation is controlled by Data Set object.
"""
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
...
...
@@ -213,9 +203,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
'architecture'
:
self
.
architecture
},
"User SIGNATURE goes here."
]
data_2
=
json
.
dumps
(
data_list_2
)
result
,
data
=
self
.
postInformation
(
key_2
,
data_2
)
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
postInformation
(
key_2
,
data_2
)
transaction
.
commit
()
self
.
tic
()
...
...
@@ -228,9 +216,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
result
,
document2
=
self
.
getInformation
(
key_2
)
self
.
assertEquals
(
1
,
len
(
json
.
loads
(
document2
)))
result
,
data
=
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
postInformation
()
transaction
.
commit
()
self
.
tic
()
self
.
assertEquals
(
2
,
len
(
self
.
portal
.
data_set_module
))
...
...
bt5/erp5_web_shadir/bt/revision
View file @
8414795b
62
\ No newline at end of file
63
\ 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