Merge lp://staging/~stevanr/linaro-license-protection/production-integration-tests into lp://staging/~linaro-automation/linaro-license-protection/trunk
Proposed by
Stevan Radaković
Status: | Merged |
---|---|
Merged at revision: | 74 |
Proposed branch: | lp://staging/~stevanr/linaro-license-protection/production-integration-tests |
Merge into: | lp://staging/~linaro-automation/linaro-license-protection/trunk |
Diff against target: |
565 lines (+496/-3) 5 files modified
docs/releases.txt (+144/-0) docs/snapshots.txt (+168/-0) testing/__init__.py (+7/-1) testing/doctest_production_browser.py (+172/-0) testing/license_protected_file_downloader.py (+5/-2) |
To merge this branch: | bzr merge lp://staging/~stevanr/linaro-license-protection/production-integration-tests |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | Approve | ||
Review via email: mp+105822@code.staging.launchpad.net |
Description of the change
Added doctest production tests for both snapshots.
New helper class for directory/file navigation.
Changes to __init to include doctest.
To post a comment you must log in.
So much nicer, thanks for working on this.
Now, considering what is mostly tested, I'd suggest you add a get_content_title() method which extracts the title tag (considering you are already using BeautifulSoup, that should be easy), so the output would be nicer and even more clear, for example:
Browsing into the android/ ~linaro- android/ *snowball* works without asking for any license acceptance:
>>> browser. browse_ to_relative( "android/ ") get_content_ title() browse_ to_relative( "~linaro- android" ) get_content_ title() ~linaro- android' browse_ to_relative( "snowball" ) get_content_ title() ~linaro- android/ ...snowball. ..'
>>> browser.
u'Index of /android'
>>> browser.
>>> browser.
u'Index of /android/
>>> browser.
>>> browser.
u'Index of /android/
As you can see, I am also suggesting joining a few steps behind a single narrative. I'd suggest you do the same for the target/product/* step as well.
I like all the other improvements (DoctestProduct ionBrowser( host), get_license() call etc).
It would still be nicer to print out the headers one-per-line instead of as a dict:
>>> print browser. get_header_ when_redirected ()
Content- Length: ... snapshots. ../boot. tar.bz2
Content- Type: application/x-bzip2
Location: http://
...
Also note that there is no guarantee in what order headers will be returned, and this test might easily break, so I suggest get_headers_ when_redirected sorts them by name before returning a string with one header per line.