weboob.browser.tests.url

class weboob.browser.tests.url.MyMockBrowser(*args, **kwargs)

Bases: weboob.browser.browsers.PagesBrowser

Accept any arguments, necessary for AbstractBrowser __new__ override.

AbstractBrowser, in its overridden __new__, removes itself from class hierarchy so its __new__ is called only once. In python 3, default (object) __new__ is then used for next instantiations but it’s a slot/”fixed” version supporting only one argument (type to instanciate).

BASEURL = 'http://weboob.org/'
urlIsHere = <weboob.browser.url.URL object>
urlIsHereDifKlass = <weboob.browser.url.URL object>
urlNotRegWithoutHttp = <weboob.browser.url.URL object>
urlNotRegex = <weboob.browser.url.URL object>
urlParams = <weboob.browser.url.URL object>
urlRegWithoutHttp = <weboob.browser.url.URL object>
urlRegex = <weboob.browser.url.URL object>
urlSameParams = <weboob.browser.url.URL object>
urlValue = <weboob.browser.url.URL object>
class weboob.browser.tests.url.MyMockBrowserWithoutBrowser

Bases: object

BASEURL = 'http://weboob.org/'
url = <weboob.browser.url.URL object>
class weboob.browser.tests.url.MyMockPage(browser, response, params=None, encoding=None)

Bases: weboob.browser.pages.Page

Accept any arguments, necessary for AbstractPage __new__ override.

AbstractPage, in its overridden __new__, removes itself from class hierarchy so its __new__ is called only once. In python 3, default (object) __new__ is then used for next instantiations but it’s a slot/”fixed” version supporting only one argument (type to instanciate).

class weboob.browser.tests.url.URLTest(methodName='runTest')

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

Hook method for setting up the test fixture before exercising it.

test_build_nominal_case()
test_build_urlParams_KO_missedparams()
test_build_urlParams_KO_moreparams()
test_build_urlParams_OK()
test_build_urlSameParams_OK()
test_ishere_klass_none()
test_match_base_none_browser_none()
test_match_base_not_none_browser_none()
test_match_url_pasregex_baseurl()
test_match_url_regex_baseurl()
test_match_url_without_http()
test_match_url_without_http_fail()