mozhg.tests package¶
Submodules¶
mozhg.tests.auth module¶
Dummy Mercurial extension to facilitate testing of mozhg.auth.getbugzillaauth().
- mozhg.tests.auth.HGEXT_BOOTSTRAP()¶
- mozhg.tests.auth.bzauth(ui, require=False, fakegetpass=None, ffprofile=None)¶
- mozhg.tests.auth.bzcreatecookie(ui, profiledir, url, userid, cookie)¶
mozhg.tests.test_auth module¶
- class mozhg.tests.test_auth.TestAuth(methodName='runTest')¶
Bases:
TestCase- p(*parts)¶
- setUp()¶
Hook method for setting up the test fixture before exercising it.
- tearDown()¶
Hook method for deconstructing the test fixture after testing it.
- test_container()¶
- test_cookie_empty_db()¶
Ensure empty cookies.db behaves properly.
- test_cookie_no_db()¶
Ensure we react sanely when no cookies.sqlite file is present.
- test_find_profiles_path()¶
- test_get_cookie_multiple_paths()¶
If we have multiple cookies for a domain, one with correct path is used.
- test_get_cookie_no_host()¶
If we request a cookie from another host, we shouldn’t get a cookie.
- test_get_cookie_simple()¶
- test_get_profiles_empty()¶
If we point at a directory without a profiles.ini, we get nothing.
- test_get_profiles_single()¶
A profiles.ini with a single profile works as expected.
- test_multiple_profiles_age_ordering()¶
Profile with newest file content comes first.
- test_multiple_profiles_default_first()¶
Test that the default profile always comes first.
- mozhg.tests.test_auth.create_cookies_db(profiledir)¶
Create a cookies SQLite database as used by Firefox profiles.
- mozhg.tests.test_auth.create_login_cookie(profiledir, url, userid, cookie)¶
Create a Bugzilla login cookie.