summaryrefslogtreecommitdiffstats
path: root/deluge/tests/test_sessionproxy.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 17:38:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-24 17:38:25 +0000
commitd269eb36c8f4d05fb0f8e9b8a00998dd41f0c829 (patch)
tree4268cb5c733a3b88e7c5b765a30f5b9fd81c804e /deluge/tests/test_sessionproxy.py
parentAdding upstream version 2.1.1. (diff)
downloaddeluge-d269eb36c8f4d05fb0f8e9b8a00998dd41f0c829.tar.xz
deluge-d269eb36c8f4d05fb0f8e9b8a00998dd41f0c829.zip
Adding upstream version 2.1.2~dev0+20230529.upstream/2.1.2_dev0+20230529
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/tests/test_sessionproxy.py')
-rw-r--r--deluge/tests/test_sessionproxy.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/deluge/tests/test_sessionproxy.py b/deluge/tests/test_sessionproxy.py
index 6fbbb24..86289cc 100644
--- a/deluge/tests/test_sessionproxy.py
+++ b/deluge/tests/test_sessionproxy.py
@@ -5,7 +5,6 @@
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
-import pytest_twisted
from twisted.internet.defer import maybeDeferred, succeed
from twisted.internet.task import Clock
@@ -125,25 +124,21 @@ class TestSessionProxy(BaseTestCase):
def test_startup(self):
assert client.core.torrents['a'] == self.sp.torrents['a'][1]
- @pytest_twisted.ensureDeferred
async def test_get_torrent_status_no_change(self):
result = await self.sp.get_torrent_status('a', [])
assert result == client.core.torrents['a']
- @pytest_twisted.ensureDeferred
async def test_get_torrent_status_change_with_cache(self):
client.core.torrents['a']['key1'] = 2
result = await self.sp.get_torrent_status('a', ['key1'])
assert result == {'key1': 1}
- @pytest_twisted.ensureDeferred
async def test_get_torrent_status_change_without_cache(self):
client.core.torrents['a']['key1'] = 2
self.clock.advance(self.sp.cache_time + 0.1)
result = await self.sp.get_torrent_status('a', [])
assert result == client.core.torrents['a']
- @pytest_twisted.ensureDeferred
async def test_get_torrent_status_key_not_updated(self):
self.clock.advance(self.sp.cache_time + 0.1)
self.sp.get_torrent_status('a', ['key1'])
@@ -151,7 +146,6 @@ class TestSessionProxy(BaseTestCase):
result = await self.sp.get_torrent_status('a', ['key2'])
assert result == {'key2': 99}
- @pytest_twisted.ensureDeferred
async def test_get_torrents_status_key_not_updated(self):
self.clock.advance(self.sp.cache_time + 0.1)
self.sp.get_torrents_status({'id': ['a']}, ['key1'])