def test_crawl_should_exit_gracefully_if_uri_is_invalid(self):
     assert "Invalid URI: 'bad.uri'" == kwrawler.crawl('bad.uri')
 def test_crawl_should_export_sitemap_as_an_image(self):
     if os.path.isfile('sitemap.png'):
         os.remove('sitemap.png')
     assert False == os.path.isfile('sitemap.png')
     kwrawler.crawl('http://example.com')
     assert True == os.path.isfile('sitemap.png')