dirhunt.tests package

Submodules

dirhunt.tests.base module

class dirhunt.tests.base.CrawlerTestBase[source]

Bases: object

get_crawler(**kwargs)[source]
get_crawler_url()[source]
url = 'http://domain.com/path/'

dirhunt.tests.test_crawler module

class dirhunt.tests.test_crawler.TestCrawler(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

test_add_init_urls()[source]
test_add_url()[source]
test_close(m1, m2)[source]
test_create_report(_, mock_dump)[source]
test_erase_tty()[source]
test_print_results()[source]
test_print_results_limit()[source]
test_resume(_, m1, m2, m3)[source]

dirhunt.tests.test_crawler_url module

class dirhunt.tests.test_crawler_url.TestCrawlerUrl(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

test_session_exception(req_mock)[source]
test_session_read_exception()[source]
test_start()[source]

dirhunt.tests.test_processors module

class dirhunt.tests.test_processors.TestError(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

test_str()[source]
class dirhunt.tests.test_processors.TestProcessBlankPageRequest(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

test_is_applicable()[source]
test_not_applicable()[source]
class dirhunt.tests.test_processors.TestProcessCssStyleSheet(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

css = 'body { background-image: url("img/foo.png") }'
test_is_applicable()[source]
test_process()[source]
class dirhunt.tests.test_processors.TestProcessHtmlRequest(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

test_assets()[source]
test_process()[source]
test_wordpress()[source]
class dirhunt.tests.test_processors.TestProcessIndexOfRequest(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

html = '\n    <html><head><title>Index Of</title></head><body>\n    <a href="..">Top</a>\n    <a href="dir/">dir</a>\n    <a href="foo.php">foo.php</a>\n    <a href="error_log">error_log</a>\n    <a href="/spam/eggs">Eggs</a></body></html>\n    '
test_flag_nothing()[source]
test_interesting_ext_files()[source]
test_interesting_files()[source]
test_interesting_name_files()[source]
test_is_applicable()[source]
test_process()[source]
test_str()[source]
class dirhunt.tests.test_processors.TestProcessJavaScript(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

js = '\n    "http://example.com" "/wrong/file/test<>b" "api/create.php?user=test"\n    "index.html"\n    '
test_is_applicable()[source]
test_process()[source]
class dirhunt.tests.test_processors.TestProcessNotFound(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

html = ''
test_fake()[source]
test_is_applicable()[source]
test_str()[source]
class dirhunt.tests.test_processors.TestProcessRedirect(methodName='runTest')[source]

Bases: CrawlerTestBase, TestCase

html = ''
test_is_applicable()[source]
test_process()[source]
test_str()[source]

dirhunt.tests.test_utils module

class dirhunt.tests.test_utils.TestCatchKeyboardInterrupt(methodName='runTest')[source]

Bases: TestCase

test_keyboard_interrupt()[source]
class dirhunt.tests.test_utils.TestCatchKeyboardInterruptChoices(methodName='runTest')[source]

Bases: TestCase

test_keyboard_interrupt()[source]
class dirhunt.tests.test_utils.TestConfirmChoicesClose(methodName='runTest')[source]

Bases: TestCase

test_choice(m)[source]
test_default(m)[source]
class dirhunt.tests.test_utils.TestConfirmClose(methodName='runTest')[source]

Bases: TestCase

test_continue(m)[source]
test_keyboard_interrupt(m)[source]
class dirhunt.tests.test_utils.TestFlatList(methodName='runTest')[source]

Bases: TestCase

test_with_sublists()[source]
test_without_items()[source]
test_without_sublists()[source]
class dirhunt.tests.test_utils.TestForceUrl(methodName='runTest')[source]

Bases: TestCase

test_default()[source]
test_full_url()[source]
test_http()[source]
test_https()[source]
class dirhunt.tests.test_utils.TestMultiplierArgs(methodName='runTest')[source]

Bases: TestCase

test_invalid_multiplier()[source]
test_multiplier()[source]
test_without_multiplier()[source]

Module contents