aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-10-12 12:44:16 +0200
committerGravatar Johannes Christ <[email protected]>2019-10-12 12:44:16 +0200
commit42abcc5b3c3cc2846a7be8b0e2f5549d820e196e (patch)
tree6007dc3893f4a59204a7abd2c2af36682439ea37 /tests
parentUpdate README.md (diff)
Move `tests.test_resources` to `unittest`.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_resources.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_resources.py b/tests/test_resources.py
new file mode 100644
index 000000000..2fc36c697
--- /dev/null
+++ b/tests/test_resources.py
@@ -0,0 +1,16 @@
+import json
+import unittest
+from pathlib import Path
+
+
+class ResourceValidationTests(unittest.TestCase):
+ """Validates resources used by the bot."""
+ def test_stars_valid(self):
+ """The resource `bot/resources/stars.json` should contain a list of strings."""
+ path = Path('bot', 'resources', 'stars.json')
+ content = path.read_text()
+ data = json.loads(content)
+
+ self.assertIsInstance(data, list)
+ for name in data:
+ self.assertIsInstance(name, str)