Skip to content

Commit

Permalink
Switch to new mixed pools build
Browse files Browse the repository at this point in the history
  • Loading branch information
wooferzfg committed Feb 27, 2024
1 parent 5b8af26 commit 1f8fe5c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
[submodule "wwrando-mixed-pools"]
path = wwrando-mixed-pools
url = https://github.com/wooferzfg/wwrando.git
branch = mixed-pools-tourney
branch = mixed-pools
6 changes: 3 additions & 3 deletions randobot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ class SeedType(Enum):
DEV_DOWNLOAD = "https://github.com/tanjo3/wwrando/releases"

MP_PERMALINKS = OrderedDict([
("mixed-pools", "MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAEA=="),
("mixed-pools", "MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAIA=="),
])
MP_DEFAULT = ["mixed-pools"]

MP_SL_PERMALINKS = OrderedDict([
("mixed-pools-sl", "MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAAA=="),
("mixed-pools-sl", "MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAAA=="),
])
MP_SL_DEFAULT = ["mixed-pools-sl"]

MP_PATH = "wwrando-mixed-pools"
MP_DOWNLOAD = "https://github.com/wooferzfg/wwrando/releases/tag/mixed-pools-tourney-build"
MP_DOWNLOAD = "https://github.com/wooferzfg/wwrando/releases/tag/mixed-pools-build"

RS_PATH = "wwrando-random-settings"
RS_VERSION = "v1.3.1"
Expand Down
2 changes: 1 addition & 1 deletion randobot/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def seconds_remaining(self):

async def print_mixed_pools_build(self):
await self.send_message(
f"Please note that this seed has been rolled on the Mixed Pools Tournament version of the randomizer. "
f"Please note that this seed has been rolled on the Mixed Pools version of the randomizer. "
f"You can download it here: {constants.MP_DOWNLOAD}"
)

Expand Down
18 changes: 9 additions & 9 deletions randobot/tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,25 +390,25 @@ async def test_rollmpseed(self, mock_send_message, mock_set_raceinfo, mock_gener
self.assertEqual(mock_send_message.call_count, 4)
mock_send_message.assert_has_calls([
call("Rolling seed..."),
call("Permalink: PERMA_MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAEA=="),
call("Permalink: PERMA_MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAIA=="),
call("Seed Hash: SEED HASH"),
call(
"Please note that this seed has been rolled on the Mixed Pools "
"Tournament version of the randomizer. You can download it here: "
"version of the randomizer. You can download it here: "
"https://github.com/wooferzfg/wwrando/releases/tag/mixed-pools-tourney-build"
),
])

self.assertEqual(mock_set_raceinfo.call_count, 1)
mock_set_raceinfo.assert_has_calls([
call("PERMA_MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAEA== | Seed Hash: SEED HASH", False, False),
call("PERMA_MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAIA== | Seed Hash: SEED HASH", False, False),
])

self.assertEqual(mock_generate_seed.call_count, 1)
mock_generate_seed.assert_has_calls([
call(
"wwrando-mixed-pools",
"MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAEA==",
"MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAIA==",
"test_user",
generate_spoiler_log=False,
new_args_format=True,
Expand Down Expand Up @@ -520,7 +520,7 @@ async def test_startmpspoilerlograce(self, mock_send_message, mock_set_raceinfo,
call("Seed rolled!"),
call(
"Please note that this seed has been rolled on the Mixed Pools "
"Tournament version of the randomizer. You can download it here: "
"version of the randomizer. You can download it here: "
"https://github.com/wooferzfg/wwrando/releases/tag/mixed-pools-tourney-build"
),
call("Preparation stage starts in 15 seconds..."),
Expand All @@ -531,7 +531,7 @@ async def test_startmpspoilerlograce(self, mock_send_message, mock_set_raceinfo,
call("1..."),
call("You have 60 minutes to prepare your route!"),
call("Spoiler Log: SPOILER_LOG_URL"),
call("Example Permalink: MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAAA=="),
call("Example Permalink: MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAAA=="),
call("Warning: The seed from this permalink does not match the actual permalink!")
])

Expand All @@ -541,16 +541,16 @@ async def test_startmpspoilerlograce(self, mock_send_message, mock_set_raceinfo,
mock_generate_seed.assert_has_calls([
call(
"wwrando-mixed-pools",
"MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAAA==",
"MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAAA==",
"test_user",
generate_spoiler_log=True,
new_args_format=True,
),
])

self.assertEqual(state["spoiler_log_seed_rolled"], True)
self.assertEqual(state["example_permalink"], "MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAAA==")
self.assertEqual(state["permalink"], "PERMA_MS4xMC4wX2Q1MTRhMjIAQQDfsGDs8CcC4vgJxj0AACQfAAAAAA==")
self.assertEqual(state["example_permalink"], "MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAAA==")
self.assertEqual(state["permalink"], "PERMA_MS4xMC4wXzVmMWJhZTYAQQDfsGDs4E8ExPETjHsAAEg+AAAAAA==")
self.assertEqual(state["spoiler_log_url"], "SPOILER_LOG_URL")
self.assertEqual(state["seed_hash"], "SEED HASH")
self.assertEqual(state["file_name"], "FILENAME")
Expand Down

0 comments on commit 1f8fe5c

Please sign in to comment.