Skip to content

Commit

Permalink
Use unittest.TestCase.assertIn
Browse files Browse the repository at this point in the history
  • Loading branch information
parente committed Jun 30, 2017
1 parent 6d068e8 commit e52283a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nbviewer/providers/url/tests/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
import unittest

import requests

Expand All @@ -13,7 +14,9 @@ class URLTestCase(NBViewerTestCase):
def test_url(self):
url = self.url('url/jdj.mit.edu/~stevenj/IJulia Preview.ipynb')
r = requests.get(url)
self.assertIn(r.status_code, (200, 202))
# Base class overrides assertIn to do unicode in unicode checking
# We want to use the original unittest implementation
unittest.TestCase.assertIn(self, r.status_code, (200, 202))
self.assertIn('Download Notebook', r.text)


Expand Down

0 comments on commit e52283a

Please sign in to comment.