Skip to content

Commit 02f6fad

Browse files
committed
Merge pull request #84 from jkeyes/test_self
Adding a test for self field in the Notification.
2 parents 13a7f6d + fc7846d commit 02f6fad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/unit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,5 +283,5 @@ def page_of_users(include_next_link=False):
283283
"first_sent_at": 1410335293,
284284
"created_at": 1410335293,
285285
"links": {},
286-
"self": None
286+
"self": "http://example.com/resource/url/"
287287
}

tests/unit/test_notification.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,8 @@ def it_returns_inner_user_object_with_nil_tags(self):
8181
}
8282
payload = Notification(**user_notification)
8383
eq_(payload.model.tags, [])
84+
85+
@istest
86+
def it_has_self_attribute(self):
87+
payload = Notification(**test_conversation_notification)
88+
eq_('http://example.com/resource/url/', payload.self)

0 commit comments

Comments
 (0)