Skip to content

Commit

Permalink
Fixed test for 2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Derrick Petzold committed Aug 29, 2014
1 parent 56d5052 commit 870fd34
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions disqusapi/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,17 @@ def test_endpoint(self):

def test_update_interface_legacy(self):
api = disqusapi.DisqusAPI(self.API_SECRET, self.API_PUBLIC)
with self.assertRaises(disqusapi.InterfaceNotDefined):
api.interface.update(extra_interface)
try:
with self.assertRaises(disqusapi.InterfaceNotDefined):
api.interface.update(extra_interface)
except TypeError:
# remove when 2.6 is obsolete
try:
api.interface.update(extra_interface)
except disqusapi.InterfaceNotDefined:
pass
else:
raise unittest.failureException('%s not raised' % (str(disqusapi.InterfaceNotDefined)))

def test_update_interface(self):
api = disqusapi.DisqusAPI(self.API_SECRET, self.API_PUBLIC)
Expand Down

0 comments on commit 870fd34

Please sign in to comment.