Skip to content

Commit 278313c

Browse files
committed
Shorter test: test_download_torrent to find the error
1 parent 1ced8b4 commit 278313c

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

tests/integration/datanetwork/test_file_commands.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@ async def initialize_torrent(self, tx_to_update=None):
4545
async def test_download_torrent(self):
4646
tx, btih = await self.initialize_torrent()
4747
self.assertNotIn('error', await self.out(self.daemon.jsonrpc_get('torrent')))
48-
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
49-
# second call, see its there and move on
50-
self.assertNotIn('error', await self.out(self.daemon.jsonrpc_get('torrent')))
51-
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
52-
self.assertEqual((await self.daemon.jsonrpc_file_list())['items'][0].identifier, btih)
53-
self.assertIn(btih, self.client_session._handles)
54-
tx, new_btih = await self.initialize_torrent(tx)
55-
self.assertNotEqual(btih, new_btih)
56-
# claim now points to another torrent, update to it
57-
self.assertNotIn('error', await self.out(self.daemon.jsonrpc_get('torrent')))
58-
self.assertEqual((await self.daemon.jsonrpc_file_list())['items'][0].identifier, new_btih)
59-
self.assertIn(new_btih, self.client_session._handles)
60-
self.assertNotIn(btih, self.client_session._handles)
61-
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
62-
await self.daemon.jsonrpc_file_delete(delete_all=True)
63-
self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
64-
self.assertNotIn(new_btih, self.client_session._handles)
48+
# self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
49+
# # second call, see its there and move on
50+
# self.assertNotIn('error', await self.out(self.daemon.jsonrpc_get('torrent')))
51+
# self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
52+
# self.assertEqual((await self.daemon.jsonrpc_file_list())['items'][0].identifier, btih)
53+
# self.assertIn(btih, self.client_session._handles)
54+
# tx, new_btih = await self.initialize_torrent(tx)
55+
# self.assertNotEqual(btih, new_btih)
56+
# # claim now points to another torrent, update to it
57+
# self.assertNotIn('error', await self.out(self.daemon.jsonrpc_get('torrent')))
58+
# self.assertEqual((await self.daemon.jsonrpc_file_list())['items'][0].identifier, new_btih)
59+
# self.assertIn(new_btih, self.client_session._handles)
60+
# self.assertNotIn(btih, self.client_session._handles)
61+
# self.assertItemCount(await self.daemon.jsonrpc_file_list(), 1)
62+
# await self.daemon.jsonrpc_file_delete(delete_all=True)
63+
# self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)
64+
# self.assertNotIn(new_btih, self.client_session._handles)
6565

6666
async def create_streams_in_range(self, *args, **kwargs):
6767
self.stream_claim_ids = []

0 commit comments

Comments
 (0)