Skip to content

Commit 5b515aa

Browse files
committed
More tests.
1 parent df30465 commit 5b515aa

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

tests/unit/test_intercom.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ def test_get_user_valid(self):
4545
self.assertEqual(None, resp['user_id'])
4646
self.assertEqual('xxx@example.com', resp['email'])
4747

48-
@raises(AuthenticationError)
49-
@patch('requests.request', create_response(401))
50-
def test_create_user_identifiers(self):
51-
Intercom.update_user()
52-
5348
@patch('requests.request', create_response(200, 'update_user_valid.json'))
5449
def test_update_user_valid(self):
5550
resp = Intercom.update_user(

tests/unit/test_note.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,7 @@ def test_properties(self):
4242
@patch('requests.request', create_response(200, 'create_note_valid.json'))
4343
def test_save(self):
4444
note = Note(email='xxx@example.com')
45-
note.save()
45+
note.save()
46+
self.assertEqual(None, note.created_at)
47+
self.assertEqual('123', note.user.user_id)
4648
self.assertEqual("<p>This is the text of my note.</p>", note.html)

tests/unit/test_user.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ def test_create(self):
105105
self.assertEqual(None, user.user_id)
106106
self.assertEqual('xxx@example.com', user.email)
107107

108+
@patch('requests.request', create_response(200, 'delete_user_valid.json'))
109+
def test_delete(self):
110+
user = User.delete(email='xxx@example.com')
111+
self.assertEqual(u'7902', user.user_id)
112+
self.assertEqual('ben@intercom.io', user.email)
113+
108114
@raises(AuthenticationError)
109115
@patch('requests.request', create_response(401))
110116
def test_find_identifiers(self):

0 commit comments

Comments
 (0)