From 62f94f1cbdcc8fd0ced2fca53aecad844a8f8a76 Mon Sep 17 00:00:00 2001 From: Henddher Pedroza Date: Sat, 13 Oct 2018 16:47:06 -0500 Subject: [PATCH] force PuzzleRecipe.db.puzzle_name to be stored as 'str' instead of unicode. Corresponding testcase --- evennia/contrib/puzzles.py | 2 +- evennia/contrib/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/contrib/puzzles.py b/evennia/contrib/puzzles.py index 4922c9191a..9db9fa356a 100644 --- a/evennia/contrib/puzzles.py +++ b/evennia/contrib/puzzles.py @@ -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) diff --git a/evennia/contrib/tests.py b/evennia/contrib/tests.py index e1b808df4b..bdf06aa05c 100644 --- a/evennia/contrib/tests.py +++ b/evennia/contrib/tests.py @@ -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)