def typical_usage_not_index_test(): handler_runner = partial(_check_main_index_path, path=['python', 'nose'], is_index=False) assert_http_redirect( run_handler_fn=handler_runner, expected_url='nose/', expected_status=301, failure_description='Index handler did not redirect to directory')
def empty_path_not_index_test(): handler_runner = partial( _check_root_path, path=[], is_index=False) assert_http_redirect( run_handler_fn=handler_runner, expected_url='/', expected_status=301, failure_description='Index handler did not redirect to directory')
def typical_usage_not_index_test(): handler_runner = partial( _check_main_index_path, path=['python', 'nose'], is_index=False) assert_http_redirect( run_handler_fn=handler_runner, expected_url='nose/', expected_status=301, failure_description='Index handler did not redirect to directory')
def handle_file_request_test(): file_entry = _generate_file_entry() handler_runner = partial( _check_file_handler, file_entry=file_entry, file_requested=file_entry.filename) assert_http_redirect( run_handler_fn=handler_runner, expected_url=file_entry.index_row.download_url, expected_status=302, failure_description='Handler did not redirect')