소스 검색

Fix tests after adding key to settings

master
Dylan Baker 7 년 전
부모
커밋
5bd289be4e
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 2
    1
      tests/test_posts.py
  2. 2
    1
      tests/test_settings.py

+ 2
- 1
tests/test_posts.py 파일 보기

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 파일 보기

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…
취소
저장