Fix unit tests for develop branch
This commit is contained in:
parent
cc809dd7e8
commit
36d8a16a80
3 changed files with 10 additions and 9 deletions
|
|
@ -1184,8 +1184,8 @@ class TestCmdParser(TestCase):
|
||||||
@override_settings(SEARCH_MULTIMATCH_REGEX=r"(?P<number>[0-9]+)-(?P<name>.*)")
|
@override_settings(SEARCH_MULTIMATCH_REGEX=r"(?P<number>[0-9]+)-(?P<name>.*)")
|
||||||
def test_num_prefixes(self):
|
def test_num_prefixes(self):
|
||||||
self.assertEqual(cmdparser.try_num_prefixes("look me"), (None, None))
|
self.assertEqual(cmdparser.try_num_prefixes("look me"), (None, None))
|
||||||
self.assertEqual(cmdparser.try_num_prefixes("3-look me"), ("3", "look me"))
|
self.assertEqual(cmdparser.try_num_prefixes("look me-3"), ("3", "look me"))
|
||||||
self.assertEqual(cmdparser.try_num_prefixes("567-look me"), ("567", "look me"))
|
self.assertEqual(cmdparser.try_num_prefixes("look me-567"), ("567", "look me"))
|
||||||
|
|
||||||
@override_settings(
|
@override_settings(
|
||||||
SEARCH_MULTIMATCH_REGEX=r"(?P<number>[0-9]+)-(?P<name>.*)", CMD_IGNORE_PREFIXES="@&/+"
|
SEARCH_MULTIMATCH_REGEX=r"(?P<number>[0-9]+)-(?P<name>.*)", CMD_IGNORE_PREFIXES="@&/+"
|
||||||
|
|
|
||||||
|
|
@ -2403,7 +2403,7 @@ class TestPuzzles(CommandTest):
|
||||||
|
|
||||||
# try solving with multiple parts but incomplete set
|
# try solving with multiple parts but incomplete set
|
||||||
self._use(
|
self._use(
|
||||||
"1-steel, 2-steel", "You try to utilize these but nothing happens ... something amiss?"
|
"steel-1, steel-2", "You try to utilize these but nothing happens ... something amiss?"
|
||||||
)
|
)
|
||||||
|
|
||||||
# arm the other puzzle. Their parts are identical
|
# arm the other puzzle. Their parts are identical
|
||||||
|
|
@ -2414,7 +2414,7 @@ class TestPuzzles(CommandTest):
|
||||||
# multiple puzzles. Both can be solved but
|
# multiple puzzles. Both can be solved but
|
||||||
# only one is.
|
# only one is.
|
||||||
self._use(
|
self._use(
|
||||||
"1-steel, 2-flint, 3-steel, 3-flint",
|
"steel-1, flint-2, steel-3, flint-3",
|
||||||
"Your gears start turning and 2 different ideas come to your mind ... ",
|
"Your gears start turning and 2 different ideas come to your mind ... ",
|
||||||
)
|
)
|
||||||
self._check_room_contents({"steel": 2, "flint": 2, "fire": 2}, check_test_tags=True)
|
self._check_room_contents({"steel": 2, "flint": 2, "fire": 2}, check_test_tags=True)
|
||||||
|
|
@ -2422,7 +2422,7 @@ class TestPuzzles(CommandTest):
|
||||||
self.room1.msg_contents = Mock()
|
self.room1.msg_contents = Mock()
|
||||||
|
|
||||||
# solve all
|
# solve all
|
||||||
self._use("1-steel, 1-flint", "You are a Genius")
|
self._use("steel-1, flint-1", "You are a Genius")
|
||||||
self.room1.msg_contents.assert_called_once_with(
|
self.room1.msg_contents.assert_called_once_with(
|
||||||
"|cChar|n performs some kind of tribal dance and |yfire|n seems to appear from thin air",
|
"|cChar|n performs some kind of tribal dance and |yfire|n seems to appear from thin air",
|
||||||
exclude=(self.char1,),
|
exclude=(self.char1,),
|
||||||
|
|
@ -2541,9 +2541,9 @@ class TestPuzzles(CommandTest):
|
||||||
self._arm(recipe_dbref, "makefire", ["steel", "flint", "red steel", "steel"])
|
self._arm(recipe_dbref, "makefire", ["steel", "flint", "red steel", "steel"])
|
||||||
self._check_room_contents({"steel": 2, "red steel": 1, "flint": 1})
|
self._check_room_contents({"steel": 2, "red steel": 1, "flint": 1})
|
||||||
self._use(
|
self._use(
|
||||||
"1-steel, flint", "You try to utilize these but nothing happens ... something amiss?"
|
"steel-1, flint", "You try to utilize these but nothing happens ... something amiss?"
|
||||||
)
|
)
|
||||||
self._use("1-steel, flint, red steel, 3-steel", "You are a Genius")
|
self._use("steel-1, flint, red steel, steel-3", "You are a Genius")
|
||||||
self._check_room_contents({"smoke": 1, "fire": 1})
|
self._check_room_contents({"smoke": 1, "fire": 1})
|
||||||
_box_all()
|
_box_all()
|
||||||
|
|
||||||
|
|
@ -2984,7 +2984,7 @@ class TestPuzzles(CommandTest):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self._use("1-battery, flashlight", "You are a Genius")
|
self._use("battery-1, flashlight", "You are a Genius")
|
||||||
self._check_room_contents(
|
self._check_room_contents(
|
||||||
{
|
{
|
||||||
"battery": 2,
|
"battery": 2,
|
||||||
|
|
@ -2995,7 +2995,7 @@ class TestPuzzles(CommandTest):
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
self._use("1-battery, flashlight-w-1", "You are a Genius")
|
self._use("battery-1, flashlight-w-1", "You are a Genius")
|
||||||
self._check_room_contents(
|
self._check_room_contents(
|
||||||
{
|
{
|
||||||
"battery": 1,
|
"battery": 1,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ bcrypt >= 3.1.7
|
||||||
|
|
||||||
# Library for Telnet-SSL support
|
# Library for Telnet-SSL support
|
||||||
pyopenssl >= 19.1
|
pyopenssl >= 19.1
|
||||||
|
service_identity >= 18.1.0
|
||||||
|
|
||||||
# AWS-storage contrib
|
# AWS-storage contrib
|
||||||
boto3 >= 1.4.4
|
boto3 >= 1.4.4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue