minor compability changes to code base, add simple unit test for totally critical bug

This commit is contained in:
Dino
2014-08-10 00:30:58 +02:00
parent 4994faaac8
commit 762a2618bc
2 changed files with 29 additions and 10 deletions

17
test_urlbot.py Normal file
View File

@@ -0,0 +1,17 @@
"""
To be executed with nose
"""
import unittest
from eventlooper import fetch_page
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))