Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
cloudooo
Commits
a1b59adf
Commit
a1b59adf
authored
Jun 01, 2011
by
Priscila Manhaes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented test for fault into getMetadata
parent
af933eee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
cloudooo/tests/cloudoooTestCase.py
cloudooo/tests/cloudoooTestCase.py
+17
-1
No files found.
cloudooo/tests/cloudoooTestCase.py
View file @
a1b59adf
...
@@ -58,6 +58,11 @@ class TestCase(unittest.TestCase):
...
@@ -58,6 +58,11 @@ class TestCase(unittest.TestCase):
for
key
,
value
in
expected_metadata
.
iteritems
():
for
key
,
value
in
expected_metadata
.
iteritems
():
self
.
assertEquals
(
metadata_dict
[
key
],
value
)
self
.
assertEquals
(
metadata_dict
[
key
],
value
)
def
_testFaultGetMetadata
(
self
,
data
,
source_format
):
""" Generic test for fail converting"""
self
.
assertRaises
(
Fault
,
self
.
proxy
.
getFileMetadataItemList
,
(
data
,
source_format
))
def
_testUpdateMetadata
(
self
,
input_url
,
source_format
,
metadata_dict
):
def
_testUpdateMetadata
(
self
,
input_url
,
source_format
,
metadata_dict
):
""" Generic test for setting metadata for file """
""" Generic test for setting metadata for file """
output_data
=
self
.
proxy
.
updateFileMetadata
(
encodestring
(
open
(
input_url
).
read
()),
output_data
=
self
.
proxy
.
updateFileMetadata
(
encodestring
(
open
(
input_url
).
read
()),
...
@@ -104,7 +109,7 @@ class TestCase(unittest.TestCase):
...
@@ -104,7 +109,7 @@ class TestCase(unittest.TestCase):
def
FaultConversionScenarioList
(
self
):
def
FaultConversionScenarioList
(
self
):
"""
"""
Method used to verify fault scenarios
Method used to verify fault
conversion
scenarios
must be overwrited into subclasses
must be overwrited into subclasses
"""
"""
return
[]
return
[]
...
@@ -113,3 +118,14 @@ class TestCase(unittest.TestCase):
...
@@ -113,3 +118,14 @@ class TestCase(unittest.TestCase):
for
scenario
in
scenarios
:
for
scenario
in
scenarios
:
self
.
_testFaultConversion
(
*
scenario
)
self
.
_testFaultConversion
(
*
scenario
)
def
FaultGetMetadataScenarioList
(
self
):
"""
Method used to verify fault getMetadata scenarios
must be overwrited into subclasses
"""
return
[]
def
runFaultGetMetadataList
(
self
,
scenarios
):
for
scenario
in
scenarios
:
self
.
_testFaultGetMetadata
(
*
scenario
)
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