Skip to content

Commit e0e8278

Browse files
committed
Fix contact_update to not expect a JSON response
1 parent dbf1d25 commit e0e8278

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

messagebird/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def contact_delete(self, id):
142142
self.request_plain_text('contacts/' + str(id), 'DELETE')
143143

144144
def contact_update(self, id, params=None):
145-
self.request('contacts/' + str(id), 'PATCH', params)
145+
self.request_plain_text('contacts/' + str(id), 'PATCH', params)
146146

147147
def contact_list(self, limit=0, offset=0):
148148
query = 'limit='+str(limit)+'&offset='+str(offset)

tests/test_contact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_contact_delete_invalid(self):
5151

5252
def test_contact_update(self):
5353
http_client = Mock()
54-
http_client.request.return_value = '{}'
54+
http_client.request.return_value = ''
5555

5656
Client('', http_client).contact_update('contact-id', {'msisdn': 31687654321, 'custom4': 'fourth'})
5757

0 commit comments

Comments
 (0)