tests: Test json file with no wallpaper.

This commit is contained in:
Dylan Araps 2017-07-23 21:42:30 +10:00
parent 06d993bc06
commit 0ccc55ffdd
2 changed files with 30 additions and 0 deletions

View File

@ -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()

View File

@ -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"
}
}