summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/test_colors.py5
-rw-r--r--tests/test_files/test_file2.json25
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py
index ef365ac..54e7236 100755
--- a/tests/test_colors.py
+++ b/tests/test_colors.py
@@ -40,6 +40,11 @@ class TestGenColors(unittest.TestCase):
result = colors.file("tests/test_files/test_file.json")
self.assertEqual(result["colors"]["color0"], "#1F211E")
+ def test_color_import_no_wallpaper(self):
+ """> Read colors from a file without a wallpaper."""
+ result = colors.file("tests/test_files/test_file2.json")
+ self.assertEqual(result["wallpaper"], "None")
+
if __name__ == "__main__":
unittest.main()
diff --git a/tests/test_files/test_file2.json b/tests/test_files/test_file2.json
new file mode 100644
index 0000000..29fbb6a
--- /dev/null
+++ b/tests/test_files/test_file2.json
@@ -0,0 +1,25 @@
+{
+ "special": {
+ "background": "#1F211E",
+ "foreground": "#F5F1F4",
+ "cursor": "#F5F1F4"
+ },
+ "colors": {
+ "color0": "#1F211E",
+ "color1": "#4B7A85",
+ "color2": "#CC6A93",
+ "color3": "#5C9894",
+ "color4": "#A0A89B",
+ "color5": "#D1B9A9",
+ "color6": "#E3D6D8",
+ "color7": "#F5F1F4",
+ "color8": "#666666",
+ "color9": "#4B7A85",
+ "color10": "#CC6A93",
+ "color11": "#5C9894",
+ "color12": "#A0A89B",
+ "color13": "#D1B9A9",
+ "color14": "#E3D6D8",
+ "color15": "#F5F1F4"
+ }
+}