2323DEFAULT_TIMEOUT = 10 # seconds
2424
2525
26- class IntercomError (StandardError ):
26+ class IntercomError (Exception ):
2727 """ Base error. """
2828 def __init__ (self , message , result = None ):
2929 super (IntercomError , self ).__init__ (message )
@@ -337,11 +337,11 @@ def reply_message_thread(
337337 ... thread_id=5591,
338338 ... body="If you're not talking to me you must be talking to someone")
339339 >>> len(message_thread)
340- 8
340+ 9
341341 >>> message_thread['thread_id']
342342 5591
343343 >>> len(message_thread['messages'])
344- 2
344+ 3
345345
346346 """
347347 params = {
@@ -364,12 +364,12 @@ def create_tag(
364364
365365 >>> tag = Intercom.create_tag("Free Trial", "tag",
366366 ... user_ids=["abc123", "def456"])
367- >>> tag.get('id', None)
367+ >>> tag['id'] != None
368+ True
368369 >>> tag['name']
369370 u'Free Trial'
370- >>> tag.get('tagged_user_count', None)
371- >>> tag['color']
372- u'green'
371+ >>> tag['tagged_user_count']
372+ 2
373373
374374 """
375375
@@ -392,12 +392,12 @@ def update_tag(
392392
393393 >>> tag = Intercom.update_tag("Free Trial", "tag",
394394 ... user_ids=["abc123", "def456"])
395- >>> tag.get('id', None)
395+ >>> tag['id'] != None
396+ True
396397 >>> tag['name']
397398 u'Free Trial'
398- >>> tag.get('tagged_user_count', None)
399- >>> tag['color']
400- u'green'
399+ >>> tag['tagged_user_count']
400+ 2
401401
402402 """
403403
@@ -417,12 +417,12 @@ def get_tag(cls, name=None):
417417 """ Return a dict for the tag by the specified name.
418418
419419 >>> tag = Intercom.get_tag(name="Free Trial")
420- >>> tag.get('id', None)
420+ >>> tag['id'] != None
421+ True
421422 >>> tag['name']
422423 u'Free Trial'
423- >>> tag.get('tagged_user_count', None)
424- >>> tag['color']
425- u'green'
424+ >>> tag['tagged_user_count']
425+ 2
426426
427427 """
428428
0 commit comments