```
AttributeError: module 'posthog.queries.sessions' has no attribute 'Sessions'
(6 additional frame(s) were not displayed)
...
  File "posthog/api/dashboard.py", line 101, in get_items
    update_dashboard_items_cache(dashboard)
  File "posthog/tasks/update_cache.py", line 73, in update_dashboard_items_cache
    update_cache_item(cache_key, cache_type, payload)
  File "posthog/tasks/update_cache.py", line 64, in update_cache_item
    result = _calculate_by_filter(filter, key, team_id, cache_type)
  File "posthog/tasks/update_cache.py", line 144, in _calculate_by_filter
    insight_class = import_from(insight_class_path[0], insight_class_path[1])
  File "posthog/tasks/update_cache.py", line 132, in import_from
    return getattr(importlib.import_module(module), name)
```
posthog/api/test/test_dashboard.py
self.client.logout()
        dashboard = Dashboard.objects.create(team=self.team, share_token="testtoken", name="public dashboard")
        test_no_token = self.client.get(f"/api/dashboard/{dashboard.pk}/")
        self.assertEqual(test_no_token.status_code, status.HTTP_403_FORBIDDEN)
        response = self.client.get(f"/api/dashboard/{dashboard.pk}/?share_token=testtoken")
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.json()["name"], "public dashboard")
    def test_shared_dashboard(self):
        self.client.logout()
        Dashboard.objects.create(
            team=self.team, share_token="testtoken", name="public dashboard", is_shared=True,
        )
        response = self.client.get("/shared_dashboard/testtoken")
        self.assertEqual(response.status_code, 200)
    def test_share_dashboard(self):
        dashboard = Dashboard.objects.create(team=self.team, name="dashboard")
        response = self.client.patch("/api/dashboard/%s/" % dashboard.pk, {"name": "dashboard 2", "is_shared": True},)
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        dashboard = Dashboard.objects.get(pk=dashboard.pk)
        self.assertIsNotNone(dashboard.share_token)
    def test_no_team_dashboards_list(self):
        self.team.delete()
        response = self.client.get("/api/dashboard/")
        self.assertDictEqual(
            response.json(), {"attr": None, "code": "not_found", "detail": "Not found.", "type": "invalid_request",},
        )
        self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
    def test_return_cached_results(self):