diff --git a/teos/appointments_dbm.py b/teos/appointments_dbm.py index e405d814..3149273b 100644 --- a/teos/appointments_dbm.py +++ b/teos/appointments_dbm.py @@ -29,7 +29,7 @@ class AppointmentsDBM(DBManager): Args: db_path (:obj:`str`): the path (relative or absolute) to the system folder containing the database. A fresh database will be created if the specified path does not contain one. - + Attributes: logger (:obj:`Logger `): the logger for this component. diff --git a/teos/chain_monitor.py b/teos/chain_monitor.py index 5dce9966..d622a51d 100644 --- a/teos/chain_monitor.py +++ b/teos/chain_monitor.py @@ -86,8 +86,8 @@ def __init__(self, receiving_queues, block_processor, bitcoind_feed_params): def enqueue(self, block_hash): """ - Adds a new block hash to the internal queue of the :obj:`ChainMonitor` and the internal state. The state contains - the list of ``last_tips`` to prevent notifying about old blocks. ``last_tips`` is bounded to + Adds a new block hash to the internal queue of the :obj:`ChainMonitor` and the internal state. The state + contains the list of ``last_tips`` to prevent notifying about old blocks. ``last_tips`` is bounded to ``max_block_window_size``. Args: diff --git a/teos/cli/rpc_client.py b/teos/cli/rpc_client.py index c68e053f..88e86c1f 100644 --- a/teos/cli/rpc_client.py +++ b/teos/cli/rpc_client.py @@ -94,4 +94,4 @@ def get_user(self, user_id): def stop(self): """Stops TEOS gracefully.""" self.stub.stop(Empty()) - print("Closing the Eye of Satoshi") \ No newline at end of file + print("Closing the Eye of Satoshi") diff --git a/teos/constants.py b/teos/constants.py index c33fec12..72f43f87 100644 --- a/teos/constants.py +++ b/teos/constants.py @@ -1,4 +1,2 @@ -import logging.handlers - SHUTDOWN_GRACE_TIME = 10 # Grace time in seconds to complete any pending call when stopping one of the services of TEOS OUTDATED_USERS_CACHE_SIZE_BLOCKS = 10 # Size of the users cache, in blocks diff --git a/teos/gatekeeper.py b/teos/gatekeeper.py index fbe01b77..9042f477 100644 --- a/teos/gatekeeper.py +++ b/teos/gatekeeper.py @@ -2,8 +2,6 @@ from queue import Queue from threading import Lock from threading import Thread -from readerwriterlock import rwlock -from collections import OrderedDict from teos.cleaner import Cleaner from teos.chain_monitor import ChainMonitor diff --git a/teos/watcher.py b/teos/watcher.py index e704efdc..54c5a5df 100644 --- a/teos/watcher.py +++ b/teos/watcher.py @@ -673,8 +673,8 @@ def get_user_info(self, user_id): user_id (:obj:`str`): the id of the requested user. Returns: - :obj:`UserInfo or :obj:`None`: The user data if found. :obj:`None` if not found, or - the ``user_id`` is invalid. + :obj:`UserInfo or :obj:`None`: The user data if found. :obj:`None` if not found, + or the ``user_id`` is invalid. """ return self.gatekeeper.registered_users.get(user_id) diff --git a/test/teos/unit/cli/test_teos_cli.py b/test/teos/unit/cli/test_teos_cli.py index f0bce0c9..1703f7f7 100644 --- a/test/teos/unit/cli/test_teos_cli.py +++ b/test/teos/unit/cli/test_teos_cli.py @@ -101,15 +101,6 @@ def test_run_exception(cli, monkeypatch): assert "Unknown error occurred: Mock Exception" == cli.run("mock_command_exception", []) -def test_get_tower_info(cli, monkeypatch): - rpc_client_mock = MagicMock(cli.rpc_client) - monkeypatch.setattr(cli, "rpc_client", rpc_client_mock) - - cli.run("get_tower_info", []) - - rpc_client_mock.get_tower_info.assert_called_once() - - def test_unknown_command_exits(cli): assert "Unknown command" in cli.run("this_command_probably_doesnt_exist", [])