From dd8e7790c85c5f5acfa625744c9352045e20bd29 Mon Sep 17 00:00:00 2001 From: Chris Van Date: Thu, 10 May 2012 01:58:03 -0700 Subject: [PATCH] fix tests --- apps/addons/models.py | 7 +++++-- apps/api/tests/test_views.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/addons/models.py b/apps/addons/models.py index 223fd45fc7..75bcdb2c54 100644 --- a/apps/addons/models.py +++ b/apps/addons/models.py @@ -767,8 +767,11 @@ class Addon(amo.models.OnChangeMixin, amo.models.ModelBase): addon_p.price = price addon_dict[addon_p.addon_id]._premium = addon_p - # Attach counts for add-on compatibility reports. - CompatReport.transformer(non_apps) + # This isn't cheating, right? I don't want to add `compat` to + # market's INSTALLED_APPS. + if not settings.MARKETPLACE: + # Attach counts for add-on compatibility reports. + CompatReport.transformer(non_apps) return addon_dict diff --git a/apps/api/tests/test_views.py b/apps/api/tests/test_views.py index 9609893151..d55994408e 100644 --- a/apps/api/tests/test_views.py +++ b/apps/api/tests/test_views.py @@ -504,7 +504,7 @@ class APITest(TestCase): '') def test_performance_data(self): - with self.assertNumQueries(27): + with self.assertNumQueries(28): response = self.client.get('/en-US/firefox/api/%.1f/addon/3615' % api.CURRENT_VERSION) doc = pq(response.content)