From aff524181f77ea8755499e9a616c71713b6453b1 Mon Sep 17 00:00:00 2001 From: John Keyes Date: Wed, 18 Mar 2015 22:40:51 +0000 Subject: [PATCH 1/2] Apply changes from @flc form. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 149d17e5..c5d03ee4 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ for convo in Conversation.find_all( # the users email for convo in Conversation.find_all(email='joe@example.com',type='user'): ... -# Iterate over through all conversations (read + unread) with a user based on +# Iterate over through all conversations (read + unread) with a user based on # the users email for convo in Conversation.find_all( email='joe@example.com', type='user', unread=False): @@ -226,7 +226,7 @@ conversation.reply( message_type= comment', body='foo') # Admin (identified by email) replies with a comment conversation.reply( - type='admin', email='bob@example.com', + type='admin', email='bob@example.com', message_type='comment', body='bar') # MARKING A CONVERSATION AS READ @@ -271,7 +271,7 @@ Tag.count() ``` python # InApp message from admin to user -Message.create({ +Message.create(**{ "message_type": "inapp", "body": "What's up :)", "from": { @@ -285,7 +285,7 @@ Message.create({ }) # Email message from admin to user -Message.create({ +Message.create(**{ "message_type": "email", "subject": "Hey there", "body": "What's up :)", @@ -301,7 +301,7 @@ Message.create({ }) # Message from a user -Message.create({ +Message.create(**{ "from": { "type": "user", "id": "536e564f316c83104c000020" From e8f8835ab22fd28e904aceaa0cb6cb41c55db286 Mon Sep 17 00:00:00 2001 From: John Keyes Date: Wed, 18 Mar 2015 22:44:46 +0000 Subject: [PATCH 2/2] Adding notes on how to run the tests. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index c5d03ee4..895954d6 100644 --- a/README.md +++ b/README.md @@ -404,3 +404,18 @@ BadRequestError RateLimitExceeded AttributeNotSetError # Raised when you try to call a getter that does not exist on an object ``` + + +## Running the Tests + +Unit tests: + +```bash +PYTHONPATH=. describe tests/unit +``` + +Integration tests: + +```bash +PYTHONPATH=. INTERCOM_APP_ID=xxx INTERCOM_APP_API_KEY=xxx nosetests tests/integration +```