Commit Graph

17 Commits

Author SHA1 Message Date
bcd7890124 Move test utilities to tools (#356)
* move test factories to libp2p/tools

* remove unused inits

* move pubsub test utils to tools

* cleanup test_interop

* fix typing libp2p/tools/utils

* add typing to pubsub utils

* fix factories typing

* fix typing for floodsub_integration_test_settings

* fix rest of the typing

* fix isort
2019-11-21 11:47:54 +08:00
7385a7a677 Add is_gossipsub fixture in interop test
To use the same code to test against both routers: floodsub and
gossipsub.
2019-09-03 16:49:00 +08:00
56ef0b962c Add test for host connect and disconnect 2019-09-02 17:32:15 +08:00
c61a06706a Refactor interop tests and factories
- Add `close` and `disconnect` in `Host`
- Add `close` and `close_peer` in `Network`
- Change `IListener.close` to async, to await for server's closing
- Add factories for security transports, and modify `HostFactory`
2019-08-29 21:38:06 +08:00
d35b8ffc64 Conform stream_id to go-mplex 2019-08-28 21:43:34 +08:00
d17e6f3392 Fix some test imports that got botched in rebase 2019-08-15 16:46:23 -07:00
3debd2c808 Run black and isort w/ the new config 2019-08-13 14:36:42 -07:00
7477b29508 run black w/ extended line length 2019-08-04 12:37:41 +08:00
7b7c8ad30d run black over dangling files 2019-08-02 11:47:08 -07:00
2e94fcf56c Remove pylint:disable 2019-08-02 23:26:06 +08:00
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
0ae9840928 Run black over repo 2019-07-31 15:00:12 -07:00
ce369d47e9 Refine exception message 2019-07-31 16:23:07 +08:00
c0e253a524 Update tests/pubsub/conftest.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:48 +08:00
3bb63612a9 Update tests/pubsub/conftest.py
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
2019-07-31 16:07:04 +08:00
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
96563c0d84 Add fixtures for pubsub and router
And a starting `test_pubsub.py`
2019-07-31 14:14:13 +08:00