Sfoglia il codice sorgente

no space before punctuation in English

Guénaël Muller 6 anni fa
parent
commit
e8732cbae9

+ 4 - 4
tracim/fixtures/content.py Vedi File

132
             content_type=ContentType.Page,
132
             content_type=ContentType.Page,
133
             workspace=recipe_workspace,
133
             workspace=recipe_workspace,
134
             parent=dessert_folder,
134
             parent=dessert_folder,
135
-            label='Tiramisu Recipes !!!',
135
+            label='Tiramisu Recipes!!!',
136
             do_save=True,
136
             do_save=True,
137
             do_notify=False,
137
             do_notify=False,
138
         )
138
         )
144
             content_api.update_content(
144
             content_api.update_content(
145
                 item=tiramisu_page,
145
                 item=tiramisu_page,
146
                 new_content='<p>To cook a greet Tiramisu, you need many ingredients.</p>',  # nopep8
146
                 new_content='<p>To cook a greet Tiramisu, you need many ingredients.</p>',  # nopep8
147
-                new_label='Tiramisu Recipes !!!',
147
+                new_label='Tiramisu Recipes!!!',
148
             )
148
             )
149
             content_api.save(tiramisu_page)
149
             content_api.save(tiramisu_page)
150
 
150
 
280
 
280
 
281
         content_api.create_comment(
281
         content_api.create_comment(
282
             parent=best_cake_thread,
282
             parent=best_cake_thread,
283
-            content='<p> What is for you the best cake ever ? </br> I personnally vote for Chocolate cupcake !</p>',  # nopep8
283
+            content='<p>What is for you the best cake ever? </br> I personnally vote for Chocolate cupcake!</p>',  # nopep8
284
             do_save=True,
284
             do_save=True,
285
         )
285
         )
286
         bob_content_api.create_comment(
286
         bob_content_api.create_comment(
287
             parent=best_cake_thread,
287
             parent=best_cake_thread,
288
-            content='<p>What about Apple Pie ? There are Awesome !</p>',
288
+            content='<p>What about Apple Pie? There are Awesome!</p>',
289
             do_save=True,
289
             do_save=True,
290
         )
290
         )
291
         reader_content_api.create_comment(
291
         reader_content_api.create_comment(

+ 7 - 7
tracim/tests/functional/test_comments.py Vedi File

28
         comment = res.json_body[0]
28
         comment = res.json_body[0]
29
         assert comment['content_id'] == 18
29
         assert comment['content_id'] == 18
30
         assert comment['parent_id'] == 7
30
         assert comment['parent_id'] == 7
31
-        assert comment['raw_content'] == '<p> What is for you the best cake ever ? </br> I personnally vote for Chocolate cupcake !</p>'  # nopep8
31
+        assert comment['raw_content'] == '<p>What is for you the best cake ever? </br> I personnally vote for Chocolate cupcake!</p>'  # nopep8
32
         assert comment['author']
32
         assert comment['author']
33
         assert comment['author']['user_id'] == 1
33
         assert comment['author']['user_id'] == 1
34
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
34
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
38
         comment = res.json_body[1]
38
         comment = res.json_body[1]
39
         assert comment['content_id'] == 19
39
         assert comment['content_id'] == 19
40
         assert comment['parent_id'] == 7
40
         assert comment['parent_id'] == 7
41
-        assert comment['raw_content'] == '<p>What about Apple Pie ? There are Awesome !</p>'  # nopep8
41
+        assert comment['raw_content'] == '<p>What about Apple Pie? There are Awesome!</p>'  # nopep8
42
         assert comment['author']
42
         assert comment['author']
43
         assert comment['author']['user_id'] == 3
43
         assert comment['author']['user_id'] == 3
44
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
44
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
71
             )
71
             )
72
         )
72
         )
73
         params = {
73
         params = {
74
-            'raw_content': 'I strongly disagree, Tiramisu win !'
74
+            'raw_content': 'I strongly disagree, Tiramisu win!'
75
         }
75
         }
76
         res = self.testapp.post_json(
76
         res = self.testapp.post_json(
77
             '/api/v2/workspaces/2/contents/7/comments',
77
             '/api/v2/workspaces/2/contents/7/comments',
81
         comment = res.json_body
81
         comment = res.json_body
82
         assert comment['content_id']
82
         assert comment['content_id']
83
         assert comment['parent_id'] == 7
83
         assert comment['parent_id'] == 7
84
-        assert comment['raw_content'] == 'I strongly disagree, Tiramisu win !'
84
+        assert comment['raw_content'] == 'I strongly disagree, Tiramisu win!'
85
         assert comment['author']
85
         assert comment['author']
86
         assert comment['author']['user_id'] == 1
86
         assert comment['author']['user_id'] == 1
87
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
87
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
110
         comment = res.json_body[0]
110
         comment = res.json_body[0]
111
         assert comment['content_id'] == 18
111
         assert comment['content_id'] == 18
112
         assert comment['parent_id'] == 7
112
         assert comment['parent_id'] == 7
113
-        assert comment['raw_content'] == '<p> What is for you the best cake ever ? </br> I personnally vote for Chocolate cupcake !</p>'   # nopep8
113
+        assert comment['raw_content'] == '<p>What is for you the best cake ever? </br> I personnally vote for Chocolate cupcake!</p>'   # nopep8
114
         assert comment['author']
114
         assert comment['author']
115
         assert comment['author']['user_id'] == 1
115
         assert comment['author']['user_id'] == 1
116
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
116
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
143
         comment = res.json_body[1]
143
         comment = res.json_body[1]
144
         assert comment['content_id'] == 19
144
         assert comment['content_id'] == 19
145
         assert comment['parent_id'] == 7
145
         assert comment['parent_id'] == 7
146
-        assert comment['raw_content'] == '<p>What about Apple Pie ? There are Awesome !</p>'   # nopep8
146
+        assert comment['raw_content'] == '<p>What about Apple Pie? There are Awesome!</p>'   # nopep8
147
         assert comment['author']
147
         assert comment['author']
148
         assert comment['author']['user_id'] == 3
148
         assert comment['author']['user_id'] == 3
149
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
149
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
176
         comment = res.json_body[1]
176
         comment = res.json_body[1]
177
         assert comment['content_id'] == 19
177
         assert comment['content_id'] == 19
178
         assert comment['parent_id'] == 7
178
         assert comment['parent_id'] == 7
179
-        assert comment['raw_content'] == '<p>What about Apple Pie ? There are Awesome !</p>'   # nopep8
179
+        assert comment['raw_content'] == '<p>What about Apple Pie? There are Awesome!</p>'   # nopep8
180
         assert comment['author']
180
         assert comment['author']
181
         assert comment['author']['user_id'] == 3
181
         assert comment['author']['user_id'] == 3
182
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url
182
         # TODO - G.M - 2018-06-172 - [avatar] setup avatar url

+ 2 - 2
tracim/tests/functional/test_contents.py Vedi File

206
         assert revision['content_id'] == 6
206
         assert revision['content_id'] == 6
207
         assert revision['is_archived'] is False
207
         assert revision['is_archived'] is False
208
         assert revision['is_deleted'] is False
208
         assert revision['is_deleted'] is False
209
-        assert revision['label'] == 'Tiramisu Recipes !!!'
209
+        assert revision['label'] == 'Tiramisu Recipes!!!'
210
         assert revision['parent_id'] == 3
210
         assert revision['parent_id'] == 3
211
         assert revision['show_in_ui'] is True
211
         assert revision['show_in_ui'] is True
212
         assert revision['slug'] == 'tiramisu-recipes'
212
         assert revision['slug'] == 'tiramisu-recipes'
227
         assert revision['content_id'] == 6
227
         assert revision['content_id'] == 6
228
         assert revision['is_archived'] is False
228
         assert revision['is_archived'] is False
229
         assert revision['is_deleted'] is False
229
         assert revision['is_deleted'] is False
230
-        assert revision['label'] == 'Tiramisu Recipes !!!'
230
+        assert revision['label'] == 'Tiramisu Recipes!!!'
231
         assert revision['parent_id'] == 3
231
         assert revision['parent_id'] == 3
232
         assert revision['show_in_ui'] is True
232
         assert revision['show_in_ui'] is True
233
         assert revision['slug'] == 'tiramisu-recipes'
233
         assert revision['slug'] == 'tiramisu-recipes'

+ 6 - 6
tracim/tests/library/test_webdav.py Vedi File

313
         eq_(
313
         eq_(
314
             True,
314
             True,
315
             content_pie.is_deleted,
315
             content_pie.is_deleted,
316
-            msg='Content should be deleted !'
316
+            msg='Content should be deleted!'
317
         )
317
         )
318
 
318
 
319
         result = provider.getResourceInst(
319
         result = provider.getResourceInst(
392
         eq_(
392
         eq_(
393
             False,
393
             False,
394
             content_new_file.is_deleted,
394
             content_new_file.is_deleted,
395
-            msg='Content should not be deleted !'
395
+            msg='Content should not be deleted!'
396
         )
396
         )
397
         content_new_file_id = content_new_file.content_id
397
         content_new_file_id = content_new_file.content_id
398
 
398
 
407
         eq_(
407
         eq_(
408
             True,
408
             True,
409
             content_pie.is_deleted,
409
             content_pie.is_deleted,
410
-            msg='Content should be deleted !'
410
+            msg='Content should be deleted!'
411
         )
411
         )
412
 
412
 
413
         result = provider.getResourceInst(
413
         result = provider.getResourceInst(
441
         eq_(
441
         eq_(
442
             True,
442
             True,
443
             content_pie.is_deleted,
443
             content_pie.is_deleted,
444
-            msg='Content should be deleted !'
444
+            msg='Content should be deleted!'
445
         )
445
         )
446
 
446
 
447
         # And an other file exist for this name
447
         # And an other file exist for this name
450
             .order_by(Content.revision_id.desc()) \
450
             .order_by(Content.revision_id.desc()) \
451
             .first()
451
             .first()
452
         assert content_new_new_file.content_id != content_new_file_id,\
452
         assert content_new_new_file.content_id != content_new_file_id,\
453
-            'Contents ids should not be same !'
453
+            'Contents ids should not be same!'
454
 
454
 
455
         eq_(
455
         eq_(
456
             False,
456
             False,
457
             content_new_new_file.is_deleted,
457
             content_new_new_file.is_deleted,
458
-            msg='Content should not be deleted !'
458
+            msg='Content should not be deleted!'
459
         )
459
         )
460
 
460
 
461
     def test_unit__rename_content__ok(self):
461
     def test_unit__rename_content__ok(self):

+ 3 - 3
tracim/views/core_api/schemas.py Vedi File

415
         example='html-content',
415
         example='html-content',
416
         validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
416
         validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
417
     )
417
     )
418
-    raw_content = marshmallow.fields.String('<p>Html page Content !</p>')
418
+    raw_content = marshmallow.fields.String('<p>Html page Content!</p>')
419
 
419
 
420
 #####
420
 #####
421
 # Revision
421
 # Revision
445
         example='html-content',
445
         example='html-content',
446
         validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
446
         validate=OneOf([content.slug for content in CONTENT_DEFAULT_TYPE]),
447
     )
447
     )
448
-    raw_content = marshmallow.fields.String('<p>Html page Content !</p>')
448
+    raw_content = marshmallow.fields.String('<p>Html page Content!</p>')
449
 
449
 
450
 
450
 
451
 ####
451
 ####
471
 
471
 
472
 
472
 
473
 class HtmlDocumentModifySchema(ContentModifySchema):
473
 class HtmlDocumentModifySchema(ContentModifySchema):
474
-    raw_content = marshmallow.fields.String('<p>Html page Content !</p>')
474
+    raw_content = marshmallow.fields.String('<p>Html page Content!</p>')
475
 
475
 
476
     @post_load
476
     @post_load
477
     def html_document_update(self, data):
477
     def html_document_update(self, data):