Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
telecom
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
Roque
telecom
Commits
bae5c56d
Commit
bae5c56d
authored
Oct 12, 2018
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendelin_telecom_ingestion: removing logs in unit tests
parent
a6a9bbf7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
bt5/erp5_wendelin_telecom_ingestion/TestTemplateItem/portal_components/test.erp5.testDataIngestion.py
...lateItem/portal_components/test.erp5.testDataIngestion.py
+13
-3
bt5/erp5_wendelin_telecom_ingestion/TestTemplateItem/portal_components/test.erp5.testDataIngestion.xml
...ateItem/portal_components/test.erp5.testDataIngestion.xml
+1
-0
No files found.
bt5/erp5_wendelin_telecom_ingestion/TestTemplateItem/portal_components/test.erp5.testDataIngestion.py
View file @
bae5c56d
...
...
@@ -376,7 +376,6 @@ class TestDataIngestion(SecurityTestCase):
self
.
checkDataObjects
(
ingestion_reference
,
data_chunk
,
None
,
json_data
)
new_data_chunk
=
''
.
join
([
random
.
choice
(
string
.
ascii_letters
+
string
.
digits
)
for
_
in
xrange
(
self
.
CHUNK_SIZE_TXT
+
1000
)])
new_json_data
=
json
.
dumps
({
"File content sample: "
:
new_data_chunk
[:
self
.
CHUNK_SIZE_TXT
]})
log
(
"Reingesting existing reference"
)
ingestion_reference
=
self
.
ingest
(
new_data_chunk
,
reference
,
self
.
TXT
)
self
.
checkDataObjects
(
ingestion_reference
,
new_data_chunk
,
None
,
new_json_data
)
...
...
@@ -398,10 +397,21 @@ class TestDataIngestion(SecurityTestCase):
json_data
=
json
.
dumps
({
"File content sample: "
:
data_chunk
[:
self
.
CHUNK_SIZE_TXT
]})
self
.
checkDataObjects
(
ingestion_reference
,
data_chunk
,
None
,
json_data
)
script_content
=
self
.
portal
.
getDescriptorHTMLContent
(
ingestion_reference
)
log
(
"script_content:"
)
log
(
script_content
)
self
.
assertEqual
(
script_content
,
json_data
)
'''
def test_data_stream_invalidation(self):
reference = self.getRandomReference()
data_chunk = ''.join([random.choice(string.ascii_letters + string.digits) for _ in xrange(self.CHUNK_SIZE_TXT + 1000)])
ingestion_reference = self.ingest(data_chunk, reference, self.TXT)
json_data = json.dumps({"File content sample: ": data_chunk[:self.CHUNK_SIZE_TXT]})
self.checkDataObjects(ingestion_reference, data_chunk, None, json_data)
#self.portal.data_stream_module.invalidateObject(data_stream.getId())
self.tic()
invalid_reference = ingestion_reference + self.INVALID
self.checkOperation(ingestion_reference, invalid_reference, data_chunk, None, json_data)
'''
# TODOs
#def test_object_invalidation(self):
...
...
bt5/erp5_wendelin_telecom_ingestion/TestTemplateItem/portal_components/test.erp5.testDataIngestion.xml
View file @
bae5c56d
...
...
@@ -57,6 +57,7 @@
<string>
W:344, 4: Unused variable \'ingestion_id\' (unused-variable)
</string>
<string>
W: 8, 0: Unused timedelta imported from datetime (unused-import)
</string>
<string>
W: 10, 0: Unused import math (unused-import)
</string>
<string>
W: 13, 0: Unused log imported from Products.ERP5Type.Log (unused-import)
</string>
<string>
W: 14, 0: Unused import hashlib (unused-import)
</string>
</tuple>
</value>
...
...
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