diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 11:13:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 11:13:08 +0000 |
commit | 9a5a4b27cb3c911f0c8ea622f183038b409de792 (patch) | |
tree | f16fe350773078608d57119ebe950c5d2793db46 /deluge/tests/test_client.py | |
parent | Releasing debian version 2.1.2~dev0+20230918-1. (diff) | |
download | deluge-9a5a4b27cb3c911f0c8ea622f183038b409de792.tar.xz deluge-9a5a4b27cb3c911f0c8ea622f183038b409de792.zip |
Merging upstream version 2.1.2~dev0+20231127.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/tests/test_client.py')
-rw-r--r-- | deluge/tests/test_client.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/deluge/tests/test_client.py b/deluge/tests/test_client.py index 5a67279..763d43c 100644 --- a/deluge/tests/test_client.py +++ b/deluge/tests/test_client.py @@ -8,7 +8,7 @@ import pytest_twisted from twisted.internet import defer from deluge import error -from deluge.common import AUTH_LEVEL_NORMAL, get_localhost_auth +from deluge.common import AUTH_LEVEL_NORMAL, get_localhost_auth, get_version from deluge.core.authmanager import AUTH_LEVEL_ADMIN from deluge.ui.client import Client, DaemonSSLProxy, client @@ -170,3 +170,23 @@ class TestClient: d.addCallbacks(self.fail, on_failure) return d + + @pytest_twisted.inlineCallbacks + def test_daemon_version(self): + username, password = get_localhost_auth() + yield client.connect( + 'localhost', self.listen_port, username=username, password=password + ) + + assert client.daemon_version == get_version() + + @pytest_twisted.inlineCallbacks + def test_daemon_version_check_min(self): + username, password = get_localhost_auth() + yield client.connect( + 'localhost', self.listen_port, username=username, password=password + ) + + assert client.daemon_version_check_min(get_version()) + assert not client.daemon_version_check_min(f'{get_version()}1') + assert client.daemon_version_check_min('0.1.0') |