-
Notifications
You must be signed in to change notification settings - Fork 284
Conversation
e86de45
to
4e4da37
Compare
4e4da37
to
4439e9f
Compare
@@ -27,6 +32,21 @@ | |||
PASSWORD = 'derp' | |||
|
|||
|
|||
def get_transaction_receipt(tx_hash, status=1): | |||
return golem_sci.structs.TransactionReceipt( | |||
raw_receipt={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo there's no reason for this function to be implemented this way, you could instead use Mock(spec=TransactionReceipt)
and set fields you are interested in.
Especially that blockHash
is still buggy just like transactionHash
has been (raw bytes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It a simple struct. Why should I mock it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid the kind of bugs that you already introduced (incorrect types in the raw_receipt).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got your point. But reason I introduced that function was exactly that. I wasn't sure what was the correct type. Once this function is bug-free it will be a good factory for all tests here. Better than mock IMO.
22ff4bb
to
7964176
Compare
Codecov Report
@@ Coverage Diff @@
## develop #4458 +/- ##
==========================================
- Coverage 90.13% 89.9% -0.23%
==========================================
Files 222 222
Lines 19523 19545 +22
==========================================
- Hits 17597 17572 -25
- Misses 1926 1973 +47 |
@igor discovered that GNT withdraw confirmation didn't work as expected.