Skip to content

Commit 71bf762

Browse files
committed
Merge pull request intercom#52 from jkeyes/fix-readme
Readme corrections.
2 parents dea4bdd + e8f8835 commit 71bf762

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ for convo in Conversation.find_all(
198198
# the users email
199199
for convo in Conversation.find_all(email='joe@example.com',type='user'):
200200
...
201-
# Iterate over through all conversations (read + unread) with a user based on
201+
# Iterate over through all conversations (read + unread) with a user based on
202202
# the users email
203203
for convo in Conversation.find_all(
204204
email='joe@example.com', type='user', unread=False):
@@ -226,7 +226,7 @@ conversation.reply(
226226
message_type= comment', body='foo')
227227
# Admin (identified by email) replies with a comment
228228
conversation.reply(
229-
type='admin', email='bob@example.com',
229+
type='admin', email='bob@example.com',
230230
message_type='comment', body='bar')
231231

232232
# MARKING A CONVERSATION AS READ
@@ -271,7 +271,7 @@ Tag.count()
271271

272272
``` python
273273
# InApp message from admin to user
274-
Message.create({
274+
Message.create(**{
275275
"message_type": "inapp",
276276
"body": "What's up :)",
277277
"from": {
@@ -285,7 +285,7 @@ Message.create({
285285
})
286286

287287
# Email message from admin to user
288-
Message.create({
288+
Message.create(**{
289289
"message_type": "email",
290290
"subject": "Hey there",
291291
"body": "What's up :)",
@@ -301,7 +301,7 @@ Message.create({
301301
})
302302

303303
# Message from a user
304-
Message.create({
304+
Message.create(**{
305305
"from": {
306306
"type": "user",
307307
"id": "536e564f316c83104c000020"
@@ -404,3 +404,18 @@ BadRequestError
404404
RateLimitExceeded
405405
AttributeNotSetError # Raised when you try to call a getter that does not exist on an object
406406
```
407+
408+
409+
## Running the Tests
410+
411+
Unit tests:
412+
413+
```bash
414+
PYTHONPATH=. describe tests/unit
415+
```
416+
417+
Integration tests:
418+
419+
```bash
420+
PYTHONPATH=. INTERCOM_APP_ID=xxx INTERCOM_APP_API_KEY=xxx nosetests tests/integration
421+
```

0 commit comments

Comments
 (0)