Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace test torrent #6487

Merged
merged 2 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/tribler-common/tribler_common/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
This module contains code that is shared between the Tribler core and GUI.
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d7:comment16:Test description10:created by27:Tribler version: 7.10.0-GIT13:creation datei1634911081e4:infod5:filesld6:lengthi6e4:pathl3:abc9:file2.txteed6:lengthi6e4:pathl3:abc9:file3.txteed6:lengthi6e4:pathl3:abc9:file4.txteed6:lengthi6e4:pathl3:def9:file6.avieed6:lengthi6e4:pathl3:def9:file5.txteed6:lengthi6e4:pathl9:file1.txteee4:name14:torrent_create12:piece lengthi16384e6:pieces20:��}"�E��Ժ����Wee
5 changes: 4 additions & 1 deletion src/tribler-core/tribler_core/tests/tools/common.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import binascii
from pathlib import Path

import tribler_common

UBUNTU_1504_INFOHASH = binascii.unhexlify('FC8A15A2FAF2734DBB1DC5F7AFDC5C9BEAEB1F59')

TESTS_DIR = Path(__file__).parent
TESTS_DATA_DIR = TESTS_DIR / "data"
COMMON_DATA_DIR = Path(tribler_common.__file__).parent / "data"

TORRENT_UBUNTU_FILE = TESTS_DATA_DIR / "ubuntu-15.04-desktop-amd64.iso.torrent"
TORRENT_UBUNTU_FILE_INFOHASH = binascii.unhexlify("fc8a15a2faf2734dbb1dc5f7afdc5c9beaeb1f59")
TORRENT_VIDEO_FILE = TESTS_DATA_DIR / "Night.Of.The.Living.Dead_1080p_archive.torrent"
TORRENT_VIDEO_FILE_INFOHASH = binascii.unhexlify("90ed3962785c52a774e89706fb4f811a468e6c05")
TORRENT_WITH_DIRS = TESTS_DATA_DIR / "multi_entries.torrent"
TORRENT_WITH_DIRS = COMMON_DATA_DIR / "multi_entries.torrent"

PNG_FILE = TESTS_DATA_DIR / "ubuntu-logo14.png"

This file was deleted.

9 changes: 5 additions & 4 deletions src/tribler-gui/tribler_gui/tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
from pathlib import Path

from PyQt5.QtCore import QMetaObject, QPoint, QProcess, QProcessEnvironment, QSettings, QTimer, Q_ARG, Qt
from PyQt5.QtGui import QPixmap, QRegion, QKeySequence
from PyQt5.QtGui import QKeySequence, QPixmap, QRegion
from PyQt5.QtTest import QTest
from PyQt5.QtWidgets import QApplication, QListWidget, QTableView, QTextEdit, QTreeWidget, QTreeWidgetItem

import pytest

import tribler_common
from tribler_common.network_utils import NetworkUtils
from tribler_common.tag_constants import MIN_TAG_LENGTH

from tribler_core.tests.tools.common import TORRENT_WITH_DIRS

import tribler_gui
import tribler_gui.core_manager as core_manager
from tribler_gui.dialogs.feedbackdialog import FeedbackDialog
Expand All @@ -28,6 +27,8 @@
from tribler_gui.widgets.torrentfiletreewidget import CHECKBOX_COL

RUN_TRIBLER_PY = Path(tribler_gui.__file__).parent.parent.parent / "run_tribler.py"
COMMON_DATA_DIR = Path(tribler_common.__file__).parent / "data"
TORRENT_WITH_DIRS = COMMON_DATA_DIR / "multi_entries.torrent"


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -423,9 +424,9 @@ def test_add_download_url(window):
wait_for_list_populated(dfl)

item = dfl.topLevelItem(0)
dfl.expand(dfl.indexFromItem(item))

item2 = item.child(0)
dfl.expand(dfl.indexFromItem(item2))
clickItem(dfl, item2, CHECKBOX_COL)
screenshot(window, name="add_torrent_url_startdownload_dialog_files")

Expand Down