Commit Graph

53 Commits (b29f4fb37965e289011f12ea4bfaf879d389e029)

Author SHA1 Message Date
Kieran R. Prasch 19f438c277
Move the slowest unit test to integration tests since it hits the disk. 2020-08-25 07:09:59 -07:00
vzotova bfa2da251f Apply suggestions from code review #2170
Co-authored-by: K Prasch <kieranprasch@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-08-20 00:49:20 +03:00
vzotova 434b7c677b `nucypher stake list`: show sub-stake status, rename `--all` option to `--show-all` 2020-08-20 00:46:04 +03:00
vzotova bb6cee4613 Removed NO_WORKER_BONDED constant from `Staker.worker_address`, used NULL_ADDRESS instead 2020-08-20 00:46:03 +03:00
Bogdan Opanchuk 6ad9a65d1a Fix pytest discovery error - make the names of test files different 2020-08-18 22:28:56 -07:00
Victoria 21cf902764 Apply suggestions from code review #2158
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: K Prasch <kieranprasch@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-08-12 22:51:30 +03:00
vzotova ada6824739 Command to merge stakes in agent, actor and CLI 2020-08-10 23:22:13 +03:00
vzotova 0d39b8a7b0 Flag to create and increase sub-stakes without deposit (using unlocked tokens) 2020-08-10 23:21:19 +03:00
tuxxy d033c0b318 Respond to review changes 2020-08-10 15:38:59 +02:00
tuxxy c6d229c2bf Fix typo in comment (thanks @fjarri) 2020-08-10 15:38:59 +02:00
tuxxy 530dc3439a Respond to change requests 2020-08-10 15:38:59 +02:00
tuxxy 71f8b914e0 Instead of mocking a LMDB env, we just manage them appropriately 2020-08-10 15:38:59 +02:00
tuxxy b1817cc9f2 Remove Ursula.work_orders and replace its use with queries to the datastore 2020-08-10 15:38:13 +02:00
tuxxy 52038e36dc Create a MockLMDBEnv w/ fixture and fix up some tests
Patch the PolicyArrangement model to fix discovery phase tests
2020-08-10 15:38:12 +02:00
tuxxy 846625d917 Replace as much old datastore logic as possible 2020-08-10 15:37:30 +02:00
tuxxy 17920cd4ca Add 'DatastoreRecord.delete' method w/ tests
Remove the unused '_fields' instance var on DatastoreRecord
2020-08-10 15:37:30 +02:00
tuxxy 662fddbeb7 Add basic skeleton for 'Datastore.query_by' method with tests
Ensure that queries only iterate over keys and not values

Query will now only process keys for unique records
2020-08-10 15:37:30 +02:00
tuxxy cc0ca2ef91 Add a basic first implementation of the datastore with tests
Add tests for the datastore models, and change 'NotFound' to 'RecordNotFound'
2020-08-10 15:37:30 +02:00
tuxxy 184b3bf563 Create a base 'DatastoreRecord' class and models with tests
Move the base models to base.py and add more datastore tests
Change key structure to 'RecordType:RecordField:RecordID'
Eliminate the db module
2020-08-10 15:37:30 +02:00
Victoria 43718a49d5 Apply suggestions from code review #2142
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-30 23:50:14 +03:00
vzotova f2acc2adda New command in CLI to increase value of specified sub-stake 2020-07-30 22:45:58 +03:00
vzotova 883f5350e4 Makes `Stake` validation stateless, new methods in `StakingEscrowAgent`, methods for increasing stake in `Staker` 2020-07-30 22:45:58 +03:00
David Núñez f5bee795d8
Merge pull request #2121 from mswilkison/worklock-terminology
Update WorkLock terminology
2020-07-15 17:46:44 +02:00
Victoria e717b6d030 Apply suggestions from code review #2117
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
2020-07-14 12:04:35 +03:00
vzotova 073cbf345e Refactor sub-stake status and selecting sub-stake 2020-07-09 16:33:25 +03:00
David Núñez 10ef0a1d62 Rename WorkLock commands and options 2020-07-08 17:13:05 +02:00
vzotova 8f598f0df6 More integration tests for stake selection 2020-07-07 17:21:06 +03:00
vzotova 796f297e93 Refactor `StakeHolder.assimilate()`, now `StakeHolder` instances from configuration and from interactive mode are the same 2020-07-07 17:19:02 +03:00
vzotova 2d0be22dec Apply suggestions from code review #2097
Co-authored-by: MacLane S Wilkison <maclane@nucypher.com>
Co-authored-by: David Núñez <david@nucypher.com>
Co-authored-by: K Prasch <kieran@nucypher.com>
2020-06-27 19:36:51 +03:00
vzotova 6c68fba65c Small docs update for collecting reward
Co-authored-by: Derek Pierre <derek.pierre@gmail.com>
2020-06-25 20:57:21 +03:00
vzotova 0e46140e8f Added `mint` command to CLI, added some warnings in `collecting-reward` command 2020-06-25 20:13:42 +03:00
vzotova 9897c0f93c Fix agent mocking: use instance to hold mocked method instead of class 2020-06-25 20:08:27 +03:00
Kieran Prasch 5909c37dd1 Apply API and interface updates to for enrico file handling. 2020-06-18 08:55:21 -07:00
damon 6d79d8db7b test fixes resulting from change in keys 2020-06-17 11:31:48 -07:00
damon 9d65b242e8 message -> plaintext 2020-06-17 00:08:48 -07:00
derekpierre 89911a87ab Code cleanup. Fix typo in test 2020-06-09 08:50:18 -04:00
David Núñez 993b70d19a Address RFCs to #2059 2020-06-01 16:45:09 +02:00
David Núñez 968a5979ed Make test refund interactive to increase coverage. Fix a bug along the way! 2020-06-01 04:16:42 +02:00
David Núñez e04247e5af Make claiming test interactive to increase coverage 2020-06-01 04:09:55 +02:00
David Núñez 787d0ca2f2 Test claiming not available 2020-06-01 04:04:00 +02:00
David Núñez 24978b058a Improve test for worklock bid time checks, to actually test the CLI layer 2020-06-01 03:26:07 +02:00
David Núñez d42f838f7a Test worklock account selection 2020-06-01 03:03:07 +02:00
David Núñez 80175c8751 Test interactive bid increasing 2020-05-31 19:51:10 +02:00
David Núñez 9745bdf602 Test interactive bidding. Extract some CLI strings to literature 2020-05-31 19:51:10 +02:00
David Núñez b023e752b3 CLI tests: Correct user input, don't pass env vars 2020-05-31 19:51:10 +02:00
David Núñez 6e2ef561b5 Improve valid bid test: make it more a CLI/Bidder integration test
Also, input is supposed to be denominated in ETH
2020-05-31 03:24:56 +02:00
David Núñez 6384a198af Mark some tests as FIXME as they are testing the Bidder, not the CLI 2020-05-31 03:24:53 +02:00
Bogdan Opanchuk 8dbaf2b206 Use `capsys` instead of `stdout_trap` 2020-05-28 14:42:04 -07:00
Bogdan Opanchuk ef9ab01a3a Replace mocking click.prompt() and click.confirm() with mocking stdin/getpass. 2020-05-28 14:42:04 -07:00
Bogdan Opanchuk 8b9d559113 Separate YES/NO (w/o linebreak) and YES_ENTER/NO_ENTER (with linebreak) in test constants 2020-05-28 14:42:02 -07:00