mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
blackified
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
446d21e4ef
commit
c45ac8b42c
@ -3,7 +3,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
""" Script to build http examples for http server api docs """
|
"""Script to build http examples for http server api docs"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
"""Common classes and methods for API handlers
|
"""Common classes and methods for API handlers"""
|
||||||
"""
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from flask import jsonify, request
|
from flask import jsonify, request
|
||||||
|
|||||||
@ -31,6 +31,7 @@ metadata = {"units": 300, "type": "KG"}
|
|||||||
|
|
||||||
SCRIPT_OUTPUTS = ["ok"]
|
SCRIPT_OUTPUTS = ["ok"]
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="new zenroom adjusteds have to be made")
|
@pytest.mark.skip(reason="new zenroom adjusteds have to be made")
|
||||||
def test_zenroom_validation(b):
|
def test_zenroom_validation(b):
|
||||||
biolabs = generate_key_pair()
|
biolabs = generate_key_pair()
|
||||||
|
|||||||
@ -11,17 +11,19 @@ import pytest
|
|||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
|
||||||
#from unittest.mock import patch
|
# from unittest.mock import patch
|
||||||
from transactions.types.assets.create import Create
|
from transactions.types.assets.create import Create
|
||||||
from transactions.types.assets.transfer import Transfer
|
from transactions.types.assets.transfer import Transfer
|
||||||
from transactions.common import crypto
|
from transactions.common import crypto
|
||||||
from transactions.common.crypto import generate_key_pair
|
from transactions.common.crypto import generate_key_pair
|
||||||
#from planetmint import processes
|
|
||||||
from planetmint.ipc import events #, POISON_PILL
|
# from planetmint import processes
|
||||||
|
from planetmint.ipc import events # , POISON_PILL
|
||||||
from planetmint.web.websocket_server import init_app, EVENTS_ENDPOINT, EVENTS_ENDPOINT_BLOCKS
|
from planetmint.web.websocket_server import init_app, EVENTS_ENDPOINT, EVENTS_ENDPOINT_BLOCKS
|
||||||
from ipld import multihash, marshal
|
from ipld import multihash, marshal
|
||||||
from planetmint.web.websocket_dispatcher import Dispatcher
|
from planetmint.web.websocket_dispatcher import Dispatcher
|
||||||
|
|
||||||
|
|
||||||
def test_eventify_block_works_with_any_transaction():
|
def test_eventify_block_works_with_any_transaction():
|
||||||
alice = generate_key_pair()
|
alice = generate_key_pair()
|
||||||
|
|
||||||
@ -160,7 +162,6 @@ def test_integration_from_webapi_to_websocket(monkeypatchonkeypatch, client, loo
|
|||||||
# plugin explicitely.
|
# plugin explicitely.
|
||||||
monkeypatch.setattr("asyncio.get_event_loop", lambda: loop)
|
monkeypatch.setattr("asyncio.get_event_loop", lambda: loop)
|
||||||
|
|
||||||
|
|
||||||
# TODO processes does not exist anymore, when reactivating this test it
|
# TODO processes does not exist anymore, when reactivating this test it
|
||||||
# will fail because of this
|
# will fail because of this
|
||||||
# Start Planetmint
|
# Start Planetmint
|
||||||
@ -168,8 +169,6 @@ def test_integration_from_webapi_to_websocket(monkeypatchonkeypatch, client, loo
|
|||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
ws_url = client.get("http://localhost:9984/api/v1/").json["_links"]["streams_v1"]
|
ws_url = client.get("http://localhost:9984/api/v1/").json["_links"]["streams_v1"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user