Kaynağa Gözat

fix tests with webdav

Guénaël Muller 7 yıl önce
ebeveyn
işleme
d0eaeeba5c

+ 10 - 0
backend/tests_configs.ini Dosyayı Görüntüle

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 Dosyayı Görüntüle

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 Dosyayı Görüntüle

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