mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 01:06:32 +01:00
force PuzzleRecipe.db.puzzle_name to be stored as 'str' instead of unicode. Corresponding testcase
This commit is contained in:
parent
cb44de5532
commit
62f94f1cbd
2 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ class PuzzleRecipe(DefaultScript):
|
|||
"""
|
||||
|
||||
def save_recipe(self, puzzle_name, parts, results):
|
||||
self.db.puzzle_name = puzzle_name
|
||||
self.db.puzzle_name = str(puzzle_name)
|
||||
self.db.parts = tuple(parts)
|
||||
self.db.results = tuple(results)
|
||||
self.tags.add(_PUZZLES_TAG_RECIPE, category=_PUZZLES_TAG_CATEGORY)
|
||||
|
|
|
|||
|
|
@ -1922,7 +1922,7 @@ class TestPuzzles(CommandTest):
|
|||
self._use('stone flint', 'There is no stone flint around.')
|
||||
self._use('stone, flint', 'You have no idea how these can be used')
|
||||
|
||||
recipe_dbref = self._good_recipe('makefire', ['stone', 'flint'], ['fire'] , and_destroy_it=False)
|
||||
recipe_dbref = self._good_recipe(unicode('makefire'), ['stone', 'flint'], ['fire'] , and_destroy_it=False)
|
||||
recipe2_dbref = self._good_recipe('makefire2', ['stone', 'flint'], ['fire'] , and_destroy_it=False,
|
||||
expected_count=2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue