Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
c6d69c93
Commit
c6d69c93
authored
Mar 17, 2021
by
Bogdan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted Repository
parent
cd5c2e2d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
repository.py
...n/trace-retrieval-microservice/app/database/repository.py
+6
-1
test_MessageHandler.py
...e-retrieval-microservice/app/tests/test_MessageHandler.py
+1
-0
upload_data.py
tools/reddit-upload/upload_data.py
+1
-1
No files found.
src/transaction-hub-in/trace-retrieval-microservice/app/database/repository.py
View file @
c6d69c93
...
...
@@ -44,8 +44,13 @@ class Repository(MongoRepositoryBase):
def
get_transaction_with_id
(
self
,
unique_id
:
str
)
->
Transaction
:
result
=
list
(
super
()
.
get_entries
(
self
.
_transaction_collection
,
projection
=
{
'_id'
:
False
},
selection
=
{
"UniqueID"
:
unique_id
}))
return
None
if
len
(
result
)
>=
1
:
return
Transaction
.
from_serializable_dict
(
result
)
returnList
=
[]
for
item
in
result
:
returnList
.
append
(
item
)
return
Transaction
.
from_serializable_dict
(
returnList
)
return
None
...
...
src/transaction-hub-in/trace-retrieval-microservice/app/tests/test_MessageHandler.py
View file @
c6d69c93
...
...
@@ -199,6 +199,7 @@ class Test_MessageHandler(unittest.TestCase):
self
.
assertEqual
(
len
(
self
.
repo
.
added_transactions
),
2
)
def
test_handleBlockchainTransaction_multipleTransactions_3AddedUnique2Duplicate
(
self
):
print
(
"Entered Test: 3Unique 2Dupli"
)
msg
=
self
.
_get_valid_message
()
msg2
=
self
.
_get_valid_message2
()
msg3
=
self
.
_get_valid_message3
()
...
...
tools/reddit-upload/upload_data.py
View file @
c6d69c93
...
...
@@ -57,7 +57,7 @@ if __name__ == '__main__':
"ApplicationType"
:
"debug"
,
"docType"
:
"pizza"
,
"id"
:
1
,
"name"
:
"
MEXICAANA
"
,
"name"
:
"
Quatro Formagi
"
,
"dough"
:
{
"type"
:
"wheat"
,
"spinach"
:
False
...
...
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