Merge ~cjwatson/launchpad:fix-storm-base into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: f3c323e3083413a340481f9e1dfae639c9ae3c19
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:fix-storm-base
Merge into: launchpad:master
Diff against target: 13 lines (+1/-1)
1 file modified
lib/lp/code/model/tests/test_sourcepackagerecipe.py (+1/-1)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+436768@code.launchpad.net

Commit message

Fix source package recipe webservice query count tests

Description of the change

Moving `SourcePackageRecipe*` to `StormBase` had the effect of flushing cached properties on instances of those classes when the Storm store is invalidated. This is a good thing, but it resulted in a couple of extra queries in some query count tests; adjust the expected counts.

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/code/model/tests/test_sourcepackagerecipe.py b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
2index 1227ece..6f4d753 100644
3--- a/lib/lp/code/model/tests/test_sourcepackagerecipe.py
4+++ b/lib/lp/code/model/tests/test_sourcepackagerecipe.py
5@@ -1615,7 +1615,7 @@ class TestWebserviceMixin:
6 store.invalidate()
7 with StormStatementRecorder() as recorder:
8 webservice.get(url)
9- self.assertThat(recorder, HasQueryCount(Equals(23)))
10+ self.assertThat(recorder, HasQueryCount(Equals(25)))
11
12
13 class TestWebserviceBzr(TestWebserviceMixin, BzrMixin, TestCaseWithFactory):

Subscribers

People subscribed via source and target branches

to status/vote changes: