fix test_server and reorganize requirements files
This commit is contained in:
parent
dc1389d634
commit
aab2ac18b3
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
.cache
|
||||
.coverage
|
||||
.pytest_cache/
|
||||
__pycache__
|
||||
*.pyc
|
||||
node_modules
|
||||
|
@ -47,10 +47,13 @@ async def test_client():
|
||||
handler.send(True, end=True)
|
||||
break
|
||||
|
||||
"""
|
||||
# TODO: save this blob, first.
|
||||
async for data in api.call('blobs.get', ['&/6q7JOKythgnnzoBI5xxvotCr5HeFkAIZSAuqHiZfLw=.sha256'], 'source'):
|
||||
if data.type.name == 'BUFFER':
|
||||
with open('./funny_img.png', 'wb') as f:
|
||||
f.write(data.data)
|
||||
"""
|
||||
|
||||
|
||||
async def main():
|
||||
|
@ -5,13 +5,15 @@ from colorlog import ColoredFormatter
|
||||
|
||||
from secret_handshake import SHSServer
|
||||
from ssb.packet_stream import PacketStream
|
||||
from ssb.protocol.streams import stream_api
|
||||
from ssb.muxrpc import MuxRPCAPI
|
||||
from ssb.util import load_ssb_secret
|
||||
|
||||
api = MuxRPCAPI()
|
||||
|
||||
|
||||
async def on_connect(conn):
|
||||
packet_stream = PacketStream(conn)
|
||||
stream_api.add_connection(packet_stream)
|
||||
api.add_connection(packet_stream)
|
||||
|
||||
print('connect', conn)
|
||||
async for msg in packet_stream:
|
||||
|
@ -1,4 +1 @@
|
||||
pynacl
|
||||
simplejson
|
||||
pytest
|
||||
secret-handshake
|
||||
-r requirements/production.txt
|
||||
|
2
requirements/dev.txt
Normal file
2
requirements/dev.txt
Normal file
@ -0,0 +1,2 @@
|
||||
-r tests.txt
|
||||
flake8
|
5
requirements/production.txt
Normal file
5
requirements/production.txt
Normal file
@ -0,0 +1,5 @@
|
||||
colorlog
|
||||
pynacl
|
||||
pyyaml
|
||||
secret-handshake
|
||||
simplejson
|
7
requirements/tests.txt
Normal file
7
requirements/tests.txt
Normal file
@ -0,0 +1,7 @@
|
||||
-r production.txt
|
||||
asynctest
|
||||
coverage
|
||||
pytest
|
||||
pytest-asyncio
|
||||
pytest-cov
|
||||
pytest-mock
|
Loading…
Reference in New Issue
Block a user