Skip to content

Commit

Permalink
Update RED API URL (#33)
Browse files Browse the repository at this point in the history
* Update RED API URL

* Updated tests

---------

Co-authored-by: DrJenkem <[email protected]>
  • Loading branch information
moleculekayak and DrJenkem authored Nov 24, 2024
1 parent ca94825 commit 53d78a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __init__(self, api_key, delay_in_seconds=2):
class RedAPI(GazelleAPI):
def __init__(self, api_key, delay_in_seconds=2):
super().__init__(
site_url="https://redacted.ch",
site_url="https://redacted.sh",
tracker_url="https://flacsfor.me",
auth_header={"Authorization": api_key},
rate_limit=delay_in_seconds,
Expand Down
8 changes: 4 additions & 4 deletions tests/test_torrent.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_saves_new_torrent_from_ops_to_red(self, red_api, ops_api):
parsed_torrent = get_bencoded_data(filepath)

assert parsed_torrent[b"announce"] == b"https://flacsfor.me/bar/announce"
assert parsed_torrent[b"comment"] == b"https://redacted.ch/torrents.php?torrentid=123"
assert parsed_torrent[b"comment"] == b"https://redacted.sh/torrents.php?torrentid=123"
assert parsed_torrent[b"info"][b"source"] == b"RED"

os.remove(filepath)
Expand All @@ -53,7 +53,7 @@ def test_works_with_qbit_fastresume_files(self, red_api, ops_api):
parsed_torrent = get_bencoded_data(filepath)

assert parsed_torrent[b"announce"] == b"https://flacsfor.me/bar/announce"
assert parsed_torrent[b"comment"] == b"https://redacted.ch/torrents.php?torrentid=123"
assert parsed_torrent[b"comment"] == b"https://redacted.sh/torrents.php?torrentid=123"
assert parsed_torrent[b"info"][b"source"] == b"RED"

os.remove(filepath)
Expand Down Expand Up @@ -89,7 +89,7 @@ def test_works_with_alternate_sources_for_creation(self, red_api, ops_api):

assert filepath == "/tmp/RED/foo [PTH].torrent"
assert parsed_torrent[b"announce"] == b"https://flacsfor.me/bar/announce"
assert parsed_torrent[b"comment"] == b"https://redacted.ch/torrents.php?torrentid=123"
assert parsed_torrent[b"comment"] == b"https://redacted.sh/torrents.php?torrentid=123"
assert parsed_torrent[b"info"][b"source"] == b"PTH"

os.remove(filepath)
Expand All @@ -112,7 +112,7 @@ def test_works_with_blank_source_for_creation(self, red_api, ops_api):

assert filepath == "/tmp/RED/foo.torrent"
assert parsed_torrent[b"announce"] == b"https://flacsfor.me/bar/announce"
assert parsed_torrent[b"comment"] == b"https://redacted.ch/torrents.php?torrentid=123"
assert parsed_torrent[b"comment"] == b"https://redacted.sh/torrents.php?torrentid=123"
assert parsed_torrent[b"info"][b"source"] == b""

os.remove(filepath)
Expand Down

0 comments on commit 53d78a5

Please sign in to comment.