Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
8414795b
Commit
8414795b
authored
13 years ago
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):
...
@@ -62,7 +62,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
data
=
result
.
read
()
data
=
result
.
read
()
finally
:
finally
:
connection
.
close
()
connection
.
close
()
return
result
.
status
,
data
self
.
assertEqual
(
result
.
status
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
def
getInformation
(
self
,
key
=
None
):
def
getInformation
(
self
,
key
=
None
):
"""
"""
...
@@ -96,11 +97,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -96,11 +97,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
"""
Check if posting information is working.
Check if posting information is working.
"""
"""
result
,
data
=
self
.
postInformation
()
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
...
@@ -143,17 +140,11 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -143,17 +140,11 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
"""
Check if posting information is working.
Check if posting information is working.
"""
"""
result
,
data
=
self
.
postInformation
()
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
result
,
data
=
self
.
postInformation
()
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
self
.
assertEqual
(
data
,
''
)
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
...
@@ -176,9 +167,9 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -176,9 +167,9 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
check if return the temp document with text content.
check if return the temp document with text content.
"""
"""
self
.
postInformation
()
self
.
postInformation
()
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
result
,
data
=
self
.
getInformation
()
result
,
data
=
self
.
getInformation
()
self
.
assertEqual
(
result
,
httplib
.
OK
)
self
.
assertEqual
(
result
,
httplib
.
OK
)
information_list
=
json
.
loads
(
data
)
information_list
=
json
.
loads
(
data
)
...
@@ -197,7 +188,6 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -197,7 +188,6 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
This relation is controlled by Data Set object.
This relation is controlled by Data Set object.
"""
"""
self
.
postInformation
()
self
.
postInformation
()
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
...
@@ -213,9 +203,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -213,9 +203,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
'architecture'
:
self
.
architecture
},
'architecture'
:
self
.
architecture
},
"User SIGNATURE goes here."
]
"User SIGNATURE goes here."
]
data_2
=
json
.
dumps
(
data_list_2
)
data_2
=
json
.
dumps
(
data_list_2
)
result
,
data
=
self
.
postInformation
(
key_2
,
data_2
)
self
.
postInformation
(
key_2
,
data_2
)
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
...
@@ -228,9 +216,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
...
@@ -228,9 +216,7 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
result
,
document2
=
self
.
getInformation
(
key_2
)
result
,
document2
=
self
.
getInformation
(
key_2
)
self
.
assertEquals
(
1
,
len
(
json
.
loads
(
document2
)))
self
.
assertEquals
(
1
,
len
(
json
.
loads
(
document2
)))
result
,
data
=
self
.
postInformation
()
self
.
postInformation
()
self
.
assertEqual
(
result
,
httplib
.
CREATED
)
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
self
.
assertEquals
(
2
,
len
(
self
.
portal
.
data_set_module
))
self
.
assertEquals
(
2
,
len
(
self
.
portal
.
data_set_module
))
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_web_shadir/bt/revision
View file @
8414795b
62
63
\ No newline at end of file
\ No newline at end of file
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