Browse Source

Fix tests after adding key to settings

master
Dylan Baker 5 years ago
parent
commit
5bd289be4e
2 changed files with 4 additions and 2 deletions
  1. 2
    1
      tests/test_posts.py
  2. 2
    1
      tests/test_settings.py

+ 2
- 1
tests/test_posts.py View File

17
     with open(os.path.join(temp_dir.name, 'settings.json'), "w") as f:
17
     with open(os.path.join(temp_dir.name, 'settings.json'), "w") as f:
18
         f.write(json.dumps({
18
         f.write(json.dumps({
19
             "PUBLIC_PATH": os.path.join(temp_dir.name, 'public'),
19
             "PUBLIC_PATH": os.path.join(temp_dir.name, 'public'),
20
-            "SITE_NAME": "test website"
20
+            "SITE_NAME": "test website",
21
+            "MARKDOWN_PREVIEW": True
21
         }))
22
         }))
22
 
23
 
23
     # Importing PostsService initializes a Settings object which depends on
24
     # Importing PostsService initializes a Settings object which depends on

+ 2
- 1
tests/test_settings.py View File

21
     with open(os.path.join(root, "settings.json"), "w") as f:
21
     with open(os.path.join(root, "settings.json"), "w") as f:
22
         f.write(json.dumps({
22
         f.write(json.dumps({
23
             "PUBLIC_PATH": os.path.join(root, "public"),
23
             "PUBLIC_PATH": os.path.join(root, "public"),
24
-            "SITE_NAME": "test website"
24
+            "SITE_NAME": "test website",
25
+            "MARKDOWN_PREVIEW": True
25
         }))
26
         }))
26
     assert Settings().YIRD_PATH == root
27
     assert Settings().YIRD_PATH == root
27
     shutil.rmtree(root)
28
     shutil.rmtree(root)

Loading…
Cancel
Save