Merge lp:~mhall119/awstrial/fixes-873066 into lp:awstrial
Proposed by
Michael Hall
Status: | Merged |
---|---|
Approved by: | Michael Hall |
Approved revision: | 261 |
Merged at revision: | 261 |
Proposed branch: | lp:~mhall119/awstrial/fixes-873066 |
Merge into: | lp:awstrial |
Diff against target: |
134 lines (+76/-14) 2 files modified
awstrial/trial/tests.py (+75/-13) awstrial/trial/views.py (+1/-1) |
To merge this branch: | bzr merge lp:~mhall119/awstrial/fixes-873066 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Nuzum (community) | Approve | ||
Review via email: mp+79180@code.launchpad.net |
Commit message
Get instance by user *and* campaign, not just by user, so that we can run multiple campaigns
Description of the change
Overview
========
Trying to start a new instance on a new campaign fails if the user has an old instance on an old campaign
Details
=======
Because the view was not filtering Instances by user *and* campaign, it would raise a MultipleObjects
To post a comment you must log in.
Nice fix. Complex test setup, but that's boto for you. A few questions:
In your test, do you need to call the first campaign before calling the second campaign? I can't tell if the first campaign call is part of the test setup, action, or verification.
Do you need to check the number of campaigns twice, once in the test setup, then at the end of the test?
Maybe not part of this review, but what happens if you set both campaigns to active?