Apply PR feedback and fix

This commit is contained in:
NIC619
2019-11-26 14:04:28 +08:00
parent fab27b0357
commit 94c7a0bca4
3 changed files with 11 additions and 7 deletions

View File

@ -1,13 +1,14 @@
from libp2p.peer.peerstore import PeerStore
import pytest
from libp2p.peer.peerstore import PeerStore, PeerStoreError
# Testing methods from IPeerStore base class.
def test_peer_info_empty():
store = PeerStore()
info = store.peer_info("peer")
assert not info
with pytest.raises(PeerStoreError):
store.peer_info("peer")
def test_peer_info_basic():