Kieran Prasch
4a4e8dd594
Finishes removal of control package, it's usages and test utils
2022-10-27 22:22:46 +01:00
Kieran Prasch
73b6b8d15d
Removes WebController and WebEmitter
2022-10-27 21:14:34 +01:00
Kieran Prasch
d1269d1507
atomically extricate porter to nucypher/nucypher-porter
2022-10-27 17:26:32 +01:00
Kieran Prasch
24a5c5e035
Rmeoves Clef and Trezor signer tests
2022-10-27 10:13:18 +01:00
Kieran Prasch
1b040cf25f
Removes db filepath configurations
2022-10-27 10:12:17 +01:00
Kieran Prasch
febc6093c1
Removes lmdb datastore usage
2022-10-27 10:12:17 +01:00
Kieran Prasch
646246ae3f
delete datastore modules
2022-10-27 10:12:17 +01:00
Kieran Prasch
17d3888c4d
Remove unused specifications, consolidate the remaining ones for use by porter alone.
2022-10-26 13:55:38 +01:00
Kieran Prasch
ba22a98db5
Removed RPC and web controller acceptance tests for characters
2022-10-25 20:01:54 +01:00
Kieran Prasch
2c4634acea
Removes RPCController and Web controller functionality
2022-10-25 17:35:25 +01:00
Kieran Prasch
07bf78d9ff
Removes Web and RPC controller entities
2022-10-25 17:35:25 +01:00
Kieran Prasch
52af298af4
Removes enrico CLI command
2022-10-25 17:35:25 +01:00
Kieran Prasch
ccbb66497a
Additional deprecation of alice/bob CLI commands. Consolidates ursula CLI config tests.
2022-10-25 16:19:21 +01:00
Kieran Prasch
8f015aa690
Accomodate deprecation of Alice, Bob, and Card CLI in internal APIs and tests.
2022-10-21 10:27:54 +01:00
Kieran Prasch
ec07eee6d2
Removes Alice, Bob, and Card CLI
2022-10-18 20:22:25 +02:00
Kieran Prasch
31fb711297
post-rebase import fix
2022-10-18 20:17:42 +02:00
Kieran Prasch
baac304d30
Removal of ConditionLingo bytes serialization assertion
2022-10-18 20:10:38 +02:00
Kieran Prasch
5fd04472ab
Support for nucypher-core Address and updates ReencryptionResponse function signature
2022-10-18 20:10:38 +02:00
Kieran Prasch
9ae4d5c966
to/from wei method updates for web3 v6+ support
2022-10-18 20:10:37 +02:00
Kieran Prasch
aa05019a68
Handle rust-native conditions newtype just-in-time; Co-existing with ConditionsLingo
2022-10-18 20:09:26 +02:00
derekpierre
19dfcd2030
Minor refactor to allow for easier testing in the future.
2022-10-18 20:09:26 +02:00
derekpierre
b7f1a1085a
Apply RFCs from #2980 .
2022-10-18 20:09:26 +02:00
derekpierre
15819cde61
Time condition in test should use integers instead of strings.
2022-10-18 20:09:25 +02:00
derekpierre
27d6112de1
Exception occuring during RPC call is propagated back to the caller as error message.
...
Better exception handling by condition objects either at creation or verification - including some refactoring of RPCCondition/ContractCondition.
Added/updated unit tests.
2022-10-18 20:09:25 +02:00
derekpierre
c7e16088fb
Simple test that shows a contract call failure not properly handled during condition verification.
...
Code cleanup.
2022-10-18 20:09:25 +02:00
derekpierre
e3446303b7
Remove support for None in ReturnValueTest - solidity has no concept of None/null so not needed. We can revisit later.
...
Updated condition tests to use 'is True' or 'is False'
Added SubscriptionManager test to show condition test whose contract call returns a struct and that the struct can be tested for equality/inequality.
2022-10-18 20:09:25 +02:00
derekpierre
d0d71944b9
Remove __eq__ from ReturnValueTest obj - only needed for tests.
2022-10-18 20:09:25 +02:00
derekpierre
658a4470a2
Apply RFCs from #2974 .
...
Co-authored-by: KPrasch <kieran@nucypher.com>
2022-10-18 20:09:25 +02:00
derekpierre
96c829d5a6
ReturnValueTest can now take any valid value type (including None) for comparison - this provides flexibility based on the result of a contract call.
...
String value types need to be quoted, but context variables are a special case of strings that don't need to be.
Added tests.
2022-10-18 20:09:25 +02:00
derekpierre
d158221794
Add '!=' comparator as a valid comparator for ReturnValueTest.
...
Updated tests.
2022-10-18 20:09:25 +02:00
derekpierre
5baac258c4
Make SubscriptionManager condition tests pass now that the facilities to make it pass are now available.
2022-10-18 20:09:25 +02:00
derekpierre
fb257cba7d
Context variables used in ReturnValueTest were not being replaced - needed for the NFT use case. Modified the code to support it.
...
Updated ERC721 condition tests to use an actual ERC721 contract with a minted NFT.
Added ERC721 tests for balanceof.
2022-10-18 20:09:25 +02:00
derekpierre
0379ce7114
Parameter types for ContractConditions do not have to be strings - we need to be careful with types when checking whether a parameter is a context variable or not.
...
ERC721 ownerOf function takes an int and not a string which caused failures.
Added/updated tests.
2022-10-18 20:09:25 +02:00
David Núñez
36e5368f3c
Add more basic unit tests for ReturnValueTest
2022-10-18 20:09:25 +02:00
David Núñez
7219c749ba
Sanitize input to constructor of ReturnValueTest
2022-10-18 20:09:25 +02:00
David Núñez
56af2bf27f
Basic unit test for ConditionLingo
2022-10-18 20:09:25 +02:00
David Núñez
7c976751b0
Playing around with malicious input that exploits the use of eval()
...
This test creates an empty file in the filesystem when evaluating a condition. This shouldn't happen! We fix it later in this PR by using the ast module
2022-10-18 20:09:25 +02:00
derekpierre
ed6227ad09
Code cleanup and additional tests..
2022-10-18 20:09:25 +02:00
derekpierre
e5fb972d2a
Initial work for propagating errors that occur during Porter.retrieve_cfrags and communicating them back to the caller in Porter's response.
2022-10-18 20:09:25 +02:00
derekpierre
f972c72470
Code cleanup to condition context variable - follow up RFCs from #2966 .
2022-10-18 20:09:25 +02:00
derekpierre
a4b9ef62d1
Improve error handling.
2022-10-18 20:09:25 +02:00
derekpierre
f6721f7b81
Don't let context variable exceptions leak into ReencryptionCondition class.
2022-10-18 20:09:25 +02:00
derekpierre
be175448f4
Perform actual validation of context provided for ":userAddress" context variable.
...
Added tests.
2022-10-18 20:09:25 +02:00
derekpierre
8c7f9f5a08
Tests updated since flask 2.2.2 has a different way of doing things.
2022-10-18 20:09:25 +02:00
derekpierre
7e8d9eb7f1
Modify tests to use context instead of python parameters. Add test for use of user customized context variable.
...
Cleanup some test code.
2022-10-18 20:09:25 +02:00
derekpierre
6d35b5754e
Simple implementation for `:userAddress` context variable pre-processing.
...
Allow for user customized context variable - fallback to key-value pairing in context.
2022-10-18 20:09:25 +02:00
derekpierre
f164cfb3a9
Clenup of tests regarding `context`. Minor fix for using lists for ConditionLingo conditions instead of tuple.
2022-10-18 20:09:25 +02:00
Kieran Prasch
0d55ed091b
w3.eth.web3 -> w3.eth.w3
2022-10-18 20:09:25 +02:00
derekpierre
31e961d458
Fix randomly failing test (regression) - context is not a required parameter.
2022-10-18 20:09:25 +02:00
derekpierre
46b40dcc57
Update format of `context` for tests.
2022-10-18 20:09:25 +02:00