Foundry JSON file now resolves magic item names.

This commit is contained in:
Mark Wolfman
2022-06-07 22:16:09 -05:00
parent 82aa9cdf24
commit 89154bef3b
2 changed files with 40 additions and 4 deletions
+12 -1
View File
@@ -226,7 +226,7 @@ class FoundryReaderTests(unittest.TestCase):
gp=162,
pp=2,
weapons=["rapier"],
magic_items=(),
# magic_items=(),
armor="padded armor",
shield="shield",
personality_traits="Loves a good lawyer joke.",
@@ -284,3 +284,14 @@ class FoundryReaderTests(unittest.TestCase):
this_result = list(this_result)
self.assertEqual(this_result, val, key)
def test_load_homebrew_weapon(self):
"""Check that the properties of a homebrew magic weapon get read
properly.
"""
charfile = FOUNDRY_JSON_FILE
with warnings.catch_warnings(record=True):
result = read_sheet_file(charfile)
# Check that some magic items were set
self.assertGreater(len(result['magic_items']), 0,
"No magic items imported")