diff --git a/tests/test_webapp.py b/tests/test_webapp.py
index e191244..41f09de 100644
--- a/tests/test_webapp.py
+++ b/tests/test_webapp.py
@@ -16,7 +16,6 @@
 # under the License.
 
 import json
-from unittest import skip
 
 from six.moves import urllib
 
@@ -39,7 +38,7 @@
         A.addApproval('code-review', 2)
         self.fake_gerrit.addEvent(A.addApproval('approved', 1))
         B = self.fake_gerrit.addFakeChange('org/project1', 'master', 'B')
-        A.addApproval('code-review', 2)
+        B.addApproval('code-review', 2)
         self.fake_gerrit.addEvent(B.addApproval('approved', 1))
         self.waitUntilSettled()
         self.port = self.webapp.server.socket.getsockname()[1]
@@ -69,11 +68,10 @@
             "http://localhost:%s/status/foo" % self.port)
         self.assertRaises(urllib.error.HTTPError, urllib.request.urlopen, req)
 
-    @skip("Disabled for early v3 development")
     def test_webapp_find_change(self):
         # can we filter by change id
         req = urllib.request.Request(
-            "http://localhost:%s/status/change/1,1" % self.port)
+            "http://localhost:%s/tenant-one/status/change/1,1" % self.port)
         f = urllib.request.urlopen(req)
         data = json.loads(f.read())
 
@@ -81,7 +79,7 @@
         self.assertEqual("org/project", data[0]['project'])
 
         req = urllib.request.Request(
-            "http://localhost:%s/status/change/2,1" % self.port)
+            "http://localhost:%s/tenant-one/status/change/2,1" % self.port)
         f = urllib.request.urlopen(req)
         data = json.loads(f.read())
 
diff --git a/zuul/webapp.py b/zuul/webapp.py
index a63f102..e16f0b4 100644
--- a/zuul/webapp.py
+++ b/zuul/webapp.py
@@ -63,7 +63,7 @@
     def stop(self):
         self.server.server_close()
 
-    def _changes_by_func(self, func):
+    def _changes_by_func(self, func, tenant_name):
         """Filter changes by a user provided function.
 
         In order to support arbitrary collection of subsets of changes
@@ -72,7 +72,7 @@
         is a flattened list of those collected changes.
         """
         status = []
-        jsonstruct = json.loads(self.cache)
+        jsonstruct = json.loads(self.cache[tenant_name])
         for pipeline in jsonstruct['pipelines']:
             for change_queue in pipeline['change_queues']:
                 for head in change_queue['heads']:
@@ -81,11 +81,11 @@
                             status.append(copy.deepcopy(change))
         return json.dumps(status)
 
-    def _status_for_change(self, rev):
+    def _status_for_change(self, rev, tenant_name):
         """Return the statuses for a particular change id X,Y."""
         def func(change):
             return change['id'] == rev
-        return self._changes_by_func(func)
+        return self._changes_by_func(func, tenant_name)
 
     def _normalize_path(self, path):
         # support legacy status.json as well as new /status
@@ -119,7 +119,7 @@
             response = webob.Response(body=self.cache[tenant_name],
                                       content_type='application/json')
         else:
-            status = self._status_for_change(path)
+            status = self._status_for_change(path, tenant_name)
             if status:
                 response = webob.Response(body=status,
                                           content_type='application/json')
