Skip to content

Commit

Permalink
Change raises class to UrlNotValidException
Browse files Browse the repository at this point in the history
  • Loading branch information
slaveofcode committed Nov 21, 2015
1 parent 0053595 commit 13c6a15
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/unit/http_tests.py
Expand Up @@ -4,8 +4,7 @@
base_dir = os.path.join(current_dir, os.pardir, os.pardir)
sys.path.append(base_dir)

from requests.exceptions import ConnectionError
from pycrawler.http import HttpRequest
from pycrawler.http import HttpRequest, UrlNotValidException


class HttpRequestTests(unittest.TestCase):
Expand All @@ -17,5 +16,5 @@ def test_response_not_empty(self):

def test_raise_error(self):
url = 'http://www.fake-url-that-not-exist-on-the-internet.com'
with self.assertRaises(ConnectionError):
with self.assertRaises(UrlNotValidException):
HttpRequest.get(url)

0 comments on commit 13c6a15

Please sign in to comment.