Skip to content

Commit

Permalink
Merge pull request #28 from radaron/update_tests_use_hd_examples
Browse files Browse the repository at this point in the history
Use HD torrents for example in every tests
  • Loading branch information
radaron authored Nov 8, 2023
2 parents d546589 + 95a3f56 commit 26a40bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if __name__ == "__main__":
client.login("<username>", "<password>")


torrent = client.search(pattern="Forrest gump", type=SearchParamType.SD_HUN, number=1,
torrent = client.search(pattern="Forrest gump", type=SearchParamType.HD_HUN, number=1,
sort_by=ParamSort.SEEDERS, sort_order=ParamSeq.DECREASING)[0]

client.download(torrent, "/tmp")
Expand Down Expand Up @@ -105,7 +105,7 @@ if __name__ == "__main__":
client = Client()
client.login("<username>", "<password>")

torrents = client.get_recommended(type=SearchParamType.SD_HUN)
torrents = client.get_recommended(type=SearchParamType.HD_HUN)
for torrent in torrents:
print(torrent['title'], torrent['type'], torrent['size'], torrent['id'])

Expand Down
4 changes: 2 additions & 2 deletions tests/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def pretty_print(torrent):

print("")
print("Donwnload torrent")
torrent = client.search(pattern="Forrest gump", type=SearchParamType.SD_HUN, number=1,
torrent = client.search(pattern="Forrest gump", type=SearchParamType.HD_HUN, number=1,
sort_by=ParamSort.SEEDERS, sort_order=ParamSeq.DECREASING)[0]

client.download(torrent, "/tmp", override=True)
Expand All @@ -61,7 +61,7 @@ def pretty_print(torrent):
pretty_print(torrent)

print_category("List by recommended")
torrents = client.get_recommended(type=SearchParamType.SD_HUN)
torrents = client.get_recommended(type=SearchParamType.HDSER_HUN)
for torrent in torrents:
pretty_print(torrent)

Expand Down
6 changes: 3 additions & 3 deletions tests/test_module/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def test_rss(self, client):
assert "FORREST" in torrent["title"].upper()

def test_recommended(self, client):
torrents = client.get_recommended(SearchParamType.SDSER_HUN)
torrents = client.get_recommended(SearchParamType.HDSER_HUN)

assert len(torrents) > 0
for torrent in torrents:
assert isinstance(torrent, Torrent)
assert torrent["type"] == SearchParamType.SDSER_HUN
assert torrent["type"] == SearchParamType.HDSER_HUN

def test_download(self, client):
torrent = client.search(pattern="forrest gump", type=SearchParamType.SD_HUN, number=1)[0]
torrent = client.search(pattern="forrest gump", type=SearchParamType.HD_HUN, number=1)[0]

client.download(torrent, ".", override=True)

Expand Down

0 comments on commit 26a40bd

Please sign in to comment.