Browse Source

fix tests

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
committed by ThomasV
parent
commit
e4ed15f683
  1. 9
      electrum/tests/test_lnchannel.py
  2. 6
      electrum/tests/test_lnpeer.py

9
electrum/tests/test_lnchannel.py

@ -23,6 +23,7 @@ import unittest
import os import os
import binascii import binascii
from pprint import pformat from pprint import pformat
import logging
from electrum import bitcoin from electrum import bitcoin
from electrum import lnpeer from electrum import lnpeer
@ -31,7 +32,7 @@ from electrum import lnutil
from electrum import bip32 as bip32_utils from electrum import bip32 as bip32_utils
from electrum.lnutil import SENT, LOCAL, REMOTE, RECEIVED from electrum.lnutil import SENT, LOCAL, REMOTE, RECEIVED
from electrum.ecc import sig_string_from_der_sig from electrum.ecc import sig_string_from_der_sig
from electrum.util import set_verbosity from electrum.logging import console_stderr_handler
one_bitcoin_in_msat = bitcoin.COIN * 1000 one_bitcoin_in_msat = bitcoin.COIN * 1000
@ -185,9 +186,9 @@ class TestChannel(unittest.TestCase):
else: else:
self.assertFalse() self.assertFalse()
@staticmethod @classmethod
def setUpClass(): def setUpClass(cls):
set_verbosity(True) console_stderr_handler.setLevel(logging.DEBUG)
def setUp(self): def setUp(self):
# Create a test channel which will be used for the duration of this # Create a test channel which will be used for the duration of this

6
electrum/tests/test_lnpeer.py

@ -4,13 +4,14 @@ from decimal import Decimal
import os import os
from contextlib import contextmanager from contextlib import contextmanager
from collections import defaultdict from collections import defaultdict
import logging
from electrum.network import Network from electrum.network import Network
from electrum.ecc import ECPrivkey from electrum.ecc import ECPrivkey
from electrum import simple_config, lnutil from electrum import simple_config, lnutil
from electrum.lnaddr import lnencode, LnAddr, lndecode from electrum.lnaddr import lnencode, LnAddr, lndecode
from electrum.bitcoin import COIN, sha256 from electrum.bitcoin import COIN, sha256
from electrum.util import bh2u, set_verbosity, create_and_start_event_loop from electrum.util import bh2u, create_and_start_event_loop
from electrum.lnpeer import Peer from electrum.lnpeer import Peer
from electrum.lnutil import LNPeerAddr, Keypair, privkey_to_pubkey from electrum.lnutil import LNPeerAddr, Keypair, privkey_to_pubkey
from electrum.lnutil import LightningPeerConnectionClosed, RemoteMisbehaving from electrum.lnutil import LightningPeerConnectionClosed, RemoteMisbehaving
@ -18,6 +19,7 @@ from electrum.lnutil import PaymentFailure, LnLocalFeatures
from electrum.lnrouter import ChannelDB, LNPathFinder from electrum.lnrouter import ChannelDB, LNPathFinder
from electrum.lnworker import LNWallet from electrum.lnworker import LNWallet
from electrum.lnmsg import encode_msg, decode_msg from electrum.lnmsg import encode_msg, decode_msg
from electrum.logging import console_stderr_handler
from .test_lnchannel import create_test_channels from .test_lnchannel import create_test_channels
from . import SequentialTestCase from . import SequentialTestCase
@ -164,7 +166,7 @@ class TestPeer(SequentialTestCase):
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
super().setUpClass() super().setUpClass()
set_verbosity(True) console_stderr_handler.setLevel(logging.DEBUG)
def setUp(self): def setUp(self):
super().setUp() super().setUp()

Loading…
Cancel
Save