Skip to content

Commit 52fc4f2

Browse files
author
Tasuku OKUDA
committed
Change mock of api test to use 'json' argument.
1 parent f1917e3 commit 52fc4f2

9 files changed

+22
-22
lines changed

tests/api/test_leave.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_leave_group(self):
1919
responses.add(
2020
responses.POST,
2121
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/group/gid/leave',
22-
body='{}', status=200
22+
json={}, status=200
2323
)
2424

2525
self.tested.leave_group('gid')
@@ -36,7 +36,7 @@ def test_leave_room(self):
3636
responses.add(
3737
responses.POST,
3838
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/room/rid/leave',
39-
body='{}', status=200
39+
json={}, status=200
4040
)
4141

4242
self.tested.leave_room('rid')

tests/api/test_send_audio_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_push_audio_message(self):
3434
responses.add(
3535
responses.POST,
3636
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
37-
body='{}', status=200
37+
json={}, status=200
3838
)
3939

4040
self.tested.push_message('to', self.audio_message)
@@ -58,7 +58,7 @@ def test_reply_audio_message(self):
5858
responses.add(
5959
responses.POST,
6060
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
61-
body='{}', status=200
61+
json={}, status=200
6262
)
6363

6464
self.tested.reply_message('replyToken', self.audio_message)

tests/api/test_send_image_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_push_image_message(self):
3434
responses.add(
3535
responses.POST,
3636
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
37-
body='{}', status=200
37+
json={}, status=200
3838
)
3939

4040
self.tested.push_message('to', self.image_message)
@@ -58,7 +58,7 @@ def test_reply_image_message(self):
5858
responses.add(
5959
responses.POST,
6060
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
61-
body='{}', status=200
61+
json={}, status=200
6262
)
6363

6464
self.tested.reply_message('replyToken', self.image_message)

tests/api/test_send_imagemap_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_push_imagemap_message(self):
7676
responses.add(
7777
responses.POST,
7878
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
79-
body='{}', status=200
79+
json={}, status=200
8080
)
8181

8282
self.tested.push_message('to', self.imagemap_message)
@@ -100,7 +100,7 @@ def test_reply_imagemap_message(self):
100100
responses.add(
101101
responses.POST,
102102
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
103-
body='{}', status=200
103+
json={}, status=200
104104
)
105105

106106
self.tested.reply_message('replyToken', self.imagemap_message)

tests/api/test_send_location_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_push_location_message(self):
3838
responses.add(
3939
responses.POST,
4040
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
41-
body='{}', status=200
41+
json={}, status=200
4242
)
4343

4444
self.tested.push_message('to', self.location_message)
@@ -62,7 +62,7 @@ def test_reply_location_message(self):
6262
responses.add(
6363
responses.POST,
6464
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
65-
body='{}', status=200
65+
json={}, status=200
6666
)
6767

6868
self.tested.reply_message('replyToken', self.location_message)

tests/api/test_send_sticker_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_push_sticker_message(self):
3232
responses.add(
3333
responses.POST,
3434
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
35-
body='{}', status=200
35+
json={}, status=200
3636
)
3737

3838
self.tested.push_message('to', self.sticker_message)
@@ -56,7 +56,7 @@ def test_reply_sticker_message(self):
5656
responses.add(
5757
responses.POST,
5858
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
59-
body='{}', status=200
59+
json={}, status=200
6060
)
6161

6262
self.tested.reply_message('replyToken', self.sticker_message)

tests/api/test_send_template_message.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def test_push_buttons_template_message(self):
215215
responses.add(
216216
responses.POST,
217217
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
218-
body='{}', status=200
218+
json={}, status=200
219219
)
220220

221221
self.tested.push_message('to', self.button_template_message)
@@ -239,7 +239,7 @@ def test_reply_buttons_template_message(self):
239239
responses.add(
240240
responses.POST,
241241
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
242-
body='{}', status=200
242+
json={}, status=200
243243
)
244244

245245
self.tested.reply_message('replyToken', self.button_template_message)
@@ -263,7 +263,7 @@ def test_push_confirm_template_message(self):
263263
responses.add(
264264
responses.POST,
265265
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
266-
body='{}', status=200
266+
json={}, status=200
267267
)
268268

269269
self.tested.push_message('to', self.confirm_template_message)
@@ -287,7 +287,7 @@ def test_reply_confirm_template_message(self):
287287
responses.add(
288288
responses.POST,
289289
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
290-
body='{}', status=200
290+
json={}, status=200
291291
)
292292

293293
self.tested.reply_message('replyToken', self.confirm_template_message)
@@ -311,7 +311,7 @@ def test_push_carousel_template_message(self):
311311
responses.add(
312312
responses.POST,
313313
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
314-
body='{}', status=200
314+
json={}, status=200
315315
)
316316

317317
self.tested.push_message('to', self.carousel_template_message)
@@ -335,7 +335,7 @@ def test_reply_carousel_template_message(self):
335335
responses.add(
336336
responses.POST,
337337
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
338-
body='{}', status=200
338+
json={}, status=200
339339
)
340340

341341
self.tested.reply_message('replyToken', self.carousel_template_message)

tests/api/test_send_text_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_push_text_message(self):
2727
responses.add(
2828
responses.POST,
2929
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
30-
body='{}', status=200
30+
json={}, status=200
3131
)
3232

3333
self.tested.push_message('to', self.text_message)
@@ -51,7 +51,7 @@ def test_reply_text_message(self):
5151
responses.add(
5252
responses.POST,
5353
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
54-
body='{}', status=200
54+
json={}, status=200
5555
)
5656

5757
self.tested.reply_message('replyToken', self.text_message)

tests/api/test_send_video_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_push_video_message(self):
3434
responses.add(
3535
responses.POST,
3636
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/push',
37-
body='{}', status=200
37+
json={}, status=200
3838
)
3939

4040
self.tested.push_message('to', self.video_message)
@@ -58,7 +58,7 @@ def test_reply_video_message(self):
5858
responses.add(
5959
responses.POST,
6060
LineBotApi.DEFAULT_API_ENDPOINT + '/v2/bot/message/reply',
61-
body='{}', status=200
61+
json={}, status=200
6262
)
6363

6464
self.tested.reply_message('replyToken', self.video_message)

0 commit comments

Comments
 (0)