Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit ab8f9ae

Browse files
committed
Add some unicode in tests for better handling
1 parent f8dd111 commit ab8f9ae

15 files changed

Lines changed: 18 additions & 17 deletions

gitlab-webhooks/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def run(*args, **kwargs):
199199
# 1 push message about new commit
200200
hook_calls.expect_call('push', 'commit_dev_branch')
201201
readme_file.content = CI_SCRIPT + '\n# even more content\n'
202-
readme_file.save(branch_name='dev', commit_message='bump2')
202+
readme_file.save(branch_name='dev', commit_message='bump2 with unicode ⇗ ⟾')
203203

204204
##############
205205
# issue events

mattermost_gitlab/event_formatter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def format(self):
7272
if self.data['total_commits_count'] > 1:
7373
description += "s"
7474

75-
suffix = str('')
75+
suffix = ''
7676
if len(self.data['commits']) > 0:
77-
suffix = str('\n')
77+
suffix = '\n'
7878

7979
text = '%s pushed %s into the `%s` branch for project [%s](%s).%s' % (
8080
self.data['user_name'],
@@ -87,7 +87,7 @@ def format(self):
8787
for val in self.data['commits']:
8888
text += "[%s](%s)" % (val['message'], val['url'])
8989

90-
return str(text)
90+
return text
9191

9292
class IssueEvent(BaseEvent):
9393

tests/data/gitlab/merge_request/close_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/close_update_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/merge_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/open_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/reopen_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/reopen_update_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/merge_request/update_merge_request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"name": "Example User"
1616
},
1717
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
18-
"message": "bump2",
18+
"message": "bump2 with unicode \u21d7 \u27fe",
1919
"timestamp": "2016-12-16T18:13:26+00:00",
2020
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2121
},

tests/data/gitlab/note/merge_request_note.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"name": "Example User"
1515
},
1616
"id": "c5ccce8cd46a277dd0723ad5954f44a562c5c67e",
17-
"message": "bump2",
17+
"message": "bump2 with unicode \u21d7 \u27fe",
1818
"timestamp": "2016-12-16T18:13:26+00:00",
1919
"url": "http://gitlab.example.com/root/example-repository/commit/c5ccce8cd46a277dd0723ad5954f44a562c5c67e"
2020
},

0 commit comments

Comments
 (0)