Merge lp:~danilo/linaro-license-protection/bug-1084013 into lp:~linaro-automation/linaro-license-protection/trunk
Status: | Merged |
---|---|
Approved by: | James Tunnicliffe |
Approved revision: | 153 |
Merged at revision: | 151 |
Proposed branch: | lp:~danilo/linaro-license-protection/bug-1084013 |
Merge into: | lp:~linaro-automation/linaro-license-protection/trunk |
Diff against target: |
260 lines (+95/-62) 5 files modified
license_protected_downloads/buildinfo.py (+2/-5) license_protected_downloads/tests/__init__.py (+13/-7) license_protected_downloads/tests/helpers.py (+42/-0) license_protected_downloads/tests/test_buildinfo.py (+17/-0) license_protected_downloads/tests/test_views.py (+21/-50) |
To merge this branch: | bzr merge lp:~danilo/linaro-license-protection/bug-1084013 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Tunnicliffe (community) | Approve | ||
Review via email: mp+136639@code.launchpad.net |
Description of the change
This ensures files like MD5SUM (all uppercase) are still recognized in BUILD-INFO patterns: problem was that we used to lowercase the key, but then didn't match against it.
I don't see any reason to try to match the globs in a case-sensitive manner, so I am instead keeping the file patterns as they are.
This branch introduces tests on both the level of BUILD-INFO parsing, and an integration test to ensure we can access a file with all uppercase filename.
Some minor cleanups are done along the way:
- temporary_directory helper has been moved into tests/helpers.py since it's used by both test_buildinfo.py and test_views.py now
- a few imports have been reordered, and I extract the shared test-case setup in test_views.py
pep8 is even stricter in quantal, I'll work on fixing that in the follow-up branch.