Merge lp:~adeuring/launchpad/bug-594247-unittests-for-searchtasks-3 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11843 |
Proposed branch: | lp:~adeuring/launchpad/bug-594247-unittests-for-searchtasks-3 |
Merge into: | lp:launchpad |
Diff against target: |
310 lines (+230/-8) 2 files modified
lib/lp/bugs/tests/test_bugtask_search.py (+218/-3) lib/lp/testing/factory.py (+12/-5) |
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-594247-unittests-for-searchtasks-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+39523@code.launchpad.net |
Commit message
unit tests for BugTaskSet.
Description of the change
This branch adds more unit tests for BugTaskSet.
I modified the testing factory method makeBug(): It is now possible to pass a distribution as the bug target. Without this change, tests of bug tasks for bugs without an upstream bugtask would have been somehwat pointless: Without this change, any bug created via makeBug() or makeBugTask() has at least one bugtask targeted to a product. In other words, a search for bugtasks without a related upstream task would never return anything.
test: ./bin/test -vvt lp.bugs.
no lint
Cool. Only one very trivial comment.
[1]
+ assert( bug.default_ bugtask. target == bugtarget)
This works, but it's misleading because assert is a statement not a
function. Actually... did you mean to remove it before landing? If
not, perhaps it should be changed to an assertEqual() call.