Alex Stokes
fb43728661
Mark some slow tests as such
2019-08-15 16:33:33 -07:00
Alex Stokes
b98025c379
Move security transports into their respective sub-packages
2019-08-15 16:33:33 -07:00
Alex Stokes
67744bcb0f
Add a basic interop test for Go and Python peer IDs
2019-08-14 09:00:40 -07:00
Alex Stokes
ad20d8cb00
Make a KeyPair
dataclass for passing around key pairs
2019-08-14 09:00:40 -07:00
Alex Stokes
329bd4eb0f
Clean up peer ID tests
2019-08-14 09:00:40 -07:00
Alex Stokes
3debd2c808
Run black
and isort
w/ the new config
2019-08-13 14:36:42 -07:00
Chih Cheng Liang
c536aa3e07
flake8
2019-08-08 16:09:02 +08:00
NIC619
a1dc68ab70
Apply PR feedback:
...
add validation failed test to `push_msg` test
2019-08-07 11:53:54 +08:00
NIC619
1cea1264a4
Raise exception when topic validation failed
2019-08-06 12:38:31 +08:00
NIC619
b96ef0e6c7
Fix:
...
`_is_subscribed_to_msg` need only subscribe to one of the topics
2019-08-05 18:20:04 +08:00
NIC619
e1b86904e3
Add validate_msg
and test
2019-08-05 18:19:32 +08:00
NIC619
f8ca4fa1ef
Add get_msg_validators
and test
2019-08-05 18:19:32 +08:00
NIC619
1ed14d0cc8
Add remove_topic_validator
test
2019-08-05 18:19:32 +08:00
NIC619
cf69f7e800
Rename to set_topic_validator
and add test
2019-08-05 18:19:31 +08:00
Chih Cheng Liang
7a04ebb51f
run black
2019-08-05 11:21:20 +08:00
Alex Stokes
7477b29508
run black w/ extended line length
2019-08-04 12:37:41 +08:00
Alex Stokes
cb301fcc51
Opt-out of linting on the special cases we have, given new ignore rules
2019-08-04 12:37:27 +08:00
mhchia
0a5b4a88ca
Fix flake8 for the existing code
2019-08-04 00:18:30 +08:00
Alex Stokes
c8005c8113
Run isort
in repo
2019-08-03 17:50:14 +08:00
Alex Stokes
21e013e753
Merge pull request #214 from ralexstokes/remove-third-party-key-in-id
...
Refactor ID to not use third-party type for cryptographic keys
2019-08-02 22:50:53 -07:00
Alex Stokes
6090d2ca3b
Clean up old comments, print stmts, formatting, etc.
2019-08-02 21:58:31 -07:00
Alex Stokes
bd8d45fbc1
Refactor ID to not use third-party type for cryptographic keys
...
Remove `ID.from_privkey` which would require specific knowledge per cryptosystem
2019-08-02 21:51:16 -07:00
Alex Stokes
d47cddee24
Clean up extraneous files in tests
2019-08-02 14:54:40 -07:00
Alex Stokes
7b7c8ad30d
run black over dangling files
2019-08-02 11:47:08 -07:00
mhchia
2e94fcf56c
Remove pylint:disable
2019-08-02 23:26:06 +08:00
NIC619
568454534f
Remove unused ID type conversions
2019-08-02 16:48:38 +08:00
NIC619
924e965537
Change argument name of Network.listen
and blakc format
2019-08-02 14:45:59 +08:00
NIC619
cd684aad9e
Update peer_id to type peer.ID in pubsub folder
2019-08-02 14:45:23 +08:00
NIC619
9562cb2a46
Rename:
...
`KadPeerInfo.peer_id` to `KadPeerInfo.peer_id_bytes`
2019-08-02 14:43:01 +08:00
NIC619
f00e80bc25
Fix wrong peer id type used in KadPeerInfo
2019-08-02 14:42:10 +08:00
NIC619
b928bdb356
Convert from base58/pubkey/privkey to class method
2019-08-02 14:42:10 +08:00
NIC619
80481252ca
Refactor ID to take in type bytes only
2019-08-02 14:42:10 +08:00
mhchia
716c60ca6d
Reflect PR feedback
...
- Remove leftover `int` in `GossipsubParams`
- Remove default fields in tests
2019-08-01 21:38:14 +08:00
mhchia
4eb846be7c
Remove the assertions for connect
...
Because it fails in `test_security_multistream.py` and this check is
indeed not necessary inside `connect`.(Should probably be outside the
function.)
2019-08-01 13:30:09 +08:00
mhchia
c72dfe1dd3
Use factories and fixtures in pubsub tests
...
Done
- Add factories using factory-boy
- Modify fixtures and tests to use factories
- Modify tests to use fixtures and factories
- Clean up
2019-08-01 13:30:08 +08:00
Alex Stokes
0ae9840928
Run black
over repo
2019-07-31 15:00:12 -07:00
mhchia
ce369d47e9
Refine exception message
2019-07-31 16:23:07 +08:00
Kevin Mai-Husan Chia
c0e253a524
Update tests/pubsub/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:48 +08:00
Kevin Mai-Husan Chia
3bb63612a9
Update tests/pubsub/conftest.py
...
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:04 +08:00
mhchia
9683d5e8ac
Add tests for Pubsub
...
- `test_handle_subscription`
- `test_handle_talk`
- `test_message_all_peers`
2019-07-31 14:15:11 +08:00
mhchia
037b95252d
Add tests for Pubsub
...
- `test_get_hello_packet`
- `test_continuously_read_stream`
- `test_publish`
- `test_push_msg`
2019-07-31 14:15:10 +08:00
mhchia
550289a439
Combine test_subscription.py to test_pubsub.py
...
And add a bunch of tests for pubsub
2019-07-31 14:15:10 +08:00
mhchia
96563c0d84
Add fixtures for pubsub and router
...
And a starting `test_pubsub.py`
2019-07-31 14:14:13 +08:00
NIC619
f2de986c74
Add type hints to peer folder
2019-07-30 16:24:51 +08:00
mhchia
f02d38c0ee
Reflect PR feedback
...
* Rename `src` to `msg_forwarder` in pubsub/floodsub/gossipsub
* Rename Variables
* Sort imports
* Clean up
2019-07-29 12:09:35 +08:00
mhchia
c028aef2de
Fix all tests
...
- Dedup `perform_test_from_obj` and the test cases used in both
`test_floodsub` and `test_gossipsub_backward_compatibility.py`.
Therefore, they are put in the standalone file
`tests/pubsub/floodsub_integration_test_settings.py`. The functions
and testcases are imported from there then.
- IMO still need a refactor on the tests. There are still some duplicate
code.
2019-07-27 11:49:03 +08:00
mhchia
65aedcb25a
Fix several tests
2019-07-26 18:35:25 +08:00
mhchia
035d08b8bd
Fix test_floodsub.py
2019-07-25 23:11:27 +08:00
mhchia
dadcf8138e
Fix the tests according to pubsub.Publish
...
And refactored a bit.
2019-07-25 16:58:00 +08:00
mhchia
cae4f34034
Refactor floodsub.publish
...
Passed the first test of floodsub
2019-07-25 14:08:16 +08:00