2014-08-10 00:30:58 +02:00
|
|
|
"""
|
|
|
|
|
To be executed with nose
|
|
|
|
|
"""
|
|
|
|
|
import unittest
|
2014-09-27 05:34:49 +02:00
|
|
|
from urlbot import fetch_page
|
2014-08-10 00:30:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestEventlooper(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
def test_broken_url(self):
|
|
|
|
|
"""
|
|
|
|
|
Test that broken socket calls are not breaking
|
|
|
|
|
"""
|
|
|
|
|
broken_url = 'http://foo'
|
|
|
|
|
result = fetch_page(url=broken_url)
|
|
|
|
|
self.assertEqual(result, (None, None))
|
|
|
|
|
|