Skip to content

Commit b9d0aff

Browse files
committed
test_set_subscription
1 parent 7c172b7 commit b9d0aff

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
'Programming Language :: Python :: 2.7',
5858
'Programming Language :: Python :: 3',
5959
'Programming Language :: Python :: 3.2',
60+
'Programming Language :: Python :: 3.3',
6061
'Programming Language :: Python :: Implementation :: CPython',
6162
],
6263
)

tests/test_repos.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,4 +837,15 @@ def test_remove_collaborator(self):
837837
self.mock_assertions()
838838

839839
def test_set_subscription(self):
840-
pass
840+
self.response('subscription')
841+
self.put(self.api + 'subscription')
842+
self.conf = {'data': {'subscribed': True, 'ignored': False}}
843+
844+
with expect.githuberror():
845+
self.repo.set_subscription(True, False)
846+
self.not_called()
847+
848+
self.login()
849+
s = self.repo.set_subscription(True, False)
850+
expect(s).isinstance(github3.notifications.Subscription)
851+
self.mock_assertions()

0 commit comments

Comments
 (0)