dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Use library mocks in proposer_tests #1078

Closed scravy closed 5 years ago

scravy commented 5 years ago

This moves the mocks from proposer_tests to test_unite_mocks such that they can be re-used in other unit tests.

It also streamlines the interface of the active chain mock to use the same patterns of result_MethodName, invocations_MethodName, etc.

Signed-off-by: Julian Fleischer julian@thirdhash.com

frolosofsky commented 5 years ago

The result_* variables read a bit unusual on a first sight, but looking at how they are used, the naming makes sense. ConceptACK.

Agree. As an active user of active chain mock, I find tip, for example, is much more convenient. I don't have strong arguments against result_GetTip tho, and most of them seems to make sense, but still.

scravy commented 5 years ago

Rebased