Remove extra fields from get_transaction

This commit is contained in:
vrde 2016-09-28 14:58:01 +02:00
parent 434797c7bf
commit c59bda653c
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D
2 changed files with 5 additions and 3 deletions

View File

@ -237,7 +237,10 @@ class Bigchain(object):
else:
# Otherwise, check the backlog
response = self.connection.run(r.table('backlog').get(txid))
response = self.connection.run(r.table('backlog')
.get(txid)
.without('assignee', 'assignment_timestamp')
.default(None))
if response:
tx_status = self.TX_IN_BACKLOG

View File

@ -131,8 +131,7 @@ class TestBigchainApi(object):
b.write_transaction(tx_signed)
response, status = b.get_transaction(tx_signed["id"], include_status=True)
response.pop('assignee')
response.pop('assignment_timestamp')
# add validity information, which will be returned
assert util.serialize(tx_signed) == util.serialize(response)
assert status == b.TX_IN_BACKLOG