소스 검색

fix tests with webdav

Guénaël Muller 6 년 전
부모
커밋
d0eaeeba5c
3개의 변경된 파일23개의 추가작업 그리고 10개의 파일을 삭제
  1. 10 0
      backend/tests_configs.ini
  2. 3 10
      backend/tracim_backend/tests/library/test_webdav.py
  3. 10 0
      backend/wsgidav-test.conf

+ 10 - 0
backend/tests_configs.ini 파일 보기

145
 email.notification.smtp.password = just_a_password
145
 email.notification.smtp.password = just_a_password
146
 website.base_url = http://localhost:6543
146
 website.base_url = http://localhost:6543
147
 color.config_file_path = %(here)s/color-test.json
147
 color.config_file_path = %(here)s/color-test.json
148
+
149
+[webdav_test]
150
+website.base_url = http://localhost:6543
151
+sqlalchemy.url = sqlite:///:memory:
152
+user.auth_token.validity = 604800
153
+depot_storage_dir = /tmp/test/depot
154
+depot_storage_name = test
155
+preview_cache_dir = /tmp/test/preview_cache
156
+color.config_file_path = %(here)s/color-test.json
157
+wsgidav.config_path = %(here)s/wsgidav-test.conf

+ 3 - 10
backend/tracim_backend/tests/library/test_webdav.py 파일 보기

22
 
22
 
23
 class TestWebdavFactory(StandardTest):
23
 class TestWebdavFactory(StandardTest):
24
 
24
 
25
+    config_section = 'webdav_test'
26
+
25
     def test_unit__initConfig__ok__nominal_case(self):
27
     def test_unit__initConfig__ok__nominal_case(self):
26
         """
28
         """
27
         Check if config is correctly modify for wsgidav using mocked
29
         Check if config is correctly modify for wsgidav using mocked
28
         wsgidav and tracim conf (as dict)
30
         wsgidav and tracim conf (as dict)
29
         :return:
31
         :return:
30
         """
32
         """
31
-        tracim_settings = {
32
-            'website.base_url': 'http://localhost:6543',
33
-            'sqlalchemy.url': 'sqlite:///:memory:',
34
-            'user.auth_token.validity': '604800',
35
-            'depot_storage_dir': '/tmp/test/depot',
36
-            'depot_storage_name': 'test',
37
-            'preview_cache_dir': '/tmp/test/preview_cache',
38
-            'wsgidav.config_path': 'development.ini'
39
-
40
-        }
33
+        tracim_settings = self.settings
41
         wsgidav_setting = DEFAULT_CONFIG.copy()
34
         wsgidav_setting = DEFAULT_CONFIG.copy()
42
         wsgidav_setting.update(
35
         wsgidav_setting.update(
43
             {
36
             {

+ 10 - 0
backend/wsgidav-test.conf 파일 보기

1
+host  = "0.0.0.0"
2
+port = 3030
3
+show_history = True
4
+show_deleted = True
5
+show_archived = True
6
+manager_locks = True
7
+root_path = ''
8
+acceptbasic = True
9
+acceptdigest = False
10
+defaultdigest = False