Test releases.linaro.org production server =========================================== Navigate to the regular ST-E license-protected file and initiate download ------------------------------------------------------------------------- Import class we will use for this test and init browser object. >>> from tests.doctest_production_browser import DoctestProductionBrowser >>> browser = DoctestProductionBrowser("http://releases.linaro.org/") Visiting homepage and check for title. >>> print browser.get_content_title() Index of / Browsing into the latest/android/leb-snowball should work without any license popping out. >>> browser.browse_to_relative("latest/") >>> print browser.get_content_title() Index of /latest >>> browser.browse_to_relative("android/") >>> print browser.get_content_title() Index of /latest/android >>> browser.browse_to_relative("leb-snowball/") >>> print browser.get_content_title() Index of /latest/android/leb-snowball Mock the boot.tar.bz2 file download and check the license. Check if the ST-E license is encountered. >>> browser.browse_to_relative("boot.tar.bz2") >>> print browser.get_license_text() This Agreement is a legal...ST-Ericsson...GOVERNING LAW AND JURISDICTION... ... Now, emulate clicking on the Accept Licence link which redirects us to the download file. Check if the headers of the requested file are in order. >>> print browser.accept_license_get_header() Accept-Ranges:... Content-Type: application/x-bzip2... Location: http://releases...snowball...boot.tar.bz2... ... Now, emulate clicking on the Decline Licence link which redirects us to the decline page. >>> print browser.decline_license() License has not been accepted Navigate to the regular Samsung license-protected file and initiate download ---------------------------------------------------------------------------- Browsing back into the /latest/android/leb-origen. It should work without any license popping out. >>> browser.browse_to_absolute("latest/") >>> print browser.get_content_title() Index of /latest >>> browser.browse_to_relative("android/") >>> print browser.get_content_title() Index of /latest/android >>> browser.browse_to_relative("leb-origen/") >>> print browser.get_content_title() Index of /latest/android/leb-origen Mock the boot.tar.bz2 file download and check the license. Check if the Samsung license is encountered. >>> browser.browse_to_relative("boot.tar.bz2") >>> print browser.get_license_text() IMPORTANT...SAMSUNG ELECTRONICS...Entire Agreement... ... Now, emulate clicking on the Accept Licence link which redirects us to the download file. Check if the headers of the requested file are in order. >>> print browser.accept_license_get_header() Accept-Ranges:... Content-Type: application/x-bzip2... Location: http://releases...origen...boot.tar.bz2... ... Now, emulate clicking on the Decline Licence link which redirects us to the decline page. >>> print browser.decline_license() License has not been accepted Navigate to the non-license-protected file and initiate download ---------------------------------------------------------------- Browsing back into the latest/android/leb-panda. It should work without any license popping out. >>> browser.browse_to_absolute("latest/") >>> print browser.get_content_title() Index of /latest >>> browser.browse_to_relative("android/") >>> print browser.get_content_title() Index of /latest/android >>> browser.browse_to_relative("leb-panda/") >>> print browser.get_content_title() Index of /latest/android/leb-panda Mock the boot.tar.bz2 file download. There should not be any license encountered. >>> browser.browse_to_relative("boot.tar.bz2") >>> print browser.get_unprotected_file_header() Accept-Ranges:... Content-Type: application/x-bzip2... ... Try accessing the leb-snowball link in platform latest android dir ------------------------------------------------------------------ Browsing back into the platform/latest/android/latest. It should work without any license popping out. >>> browser.browse_to_absolute("platform/") >>> print browser.get_content_title() Index of /platform >>> browser.browse_to_relative("latest/") >>> print browser.get_content_title() Index of /platform/latest >>> browser.browse_to_relative("android/") >>> print browser.get_content_title() Index of /platform/latest/android >>> browser.browse_to_relative("latest/") >>> print browser.get_content_title() Index of /platform/latest/android/latest Now try opening the leb-snowball link. >>> browser.browse_to_relative("leb-snowball/") >>> print browser.get_content_title() Index of /platform/latest/android/latest/leb-snowball