# Path: grafana_dashboards/components/projects.py
# class Project(ComponentBase):
#     def __init__(self, data, registry):
#         super(Project, self).__init__(data, registry)
#         self._placeholders = [placeholder for dashboard in self._get_dashboard_names()
#                               for placeholder in get_placeholders(dashboard)]
# 
#     def _get_dashboard_names(self):
#         return self.data.get('dashboards', [])
# 
#     def get_dashboards(self):
#         return [self.registry.get_component(Dashboard, dashboard_name) for dashboard_name in
#                 self._get_dashboard_names()]
# 
#     def get_contexts(self, context=None):
#         if context is None:
#             context = {}
#         data = self.data.copy()
#         data.update(context)
#         return Context.create_context(data, self._placeholders)


import mock
from grafana_dashboards.components.projects import Project
                'dashboards': [
                    'dashboard0',
                    'dashboard1',
                    '{single}',
                    '{dict}',
                    '{list}'
                ],
                'single': 'first',
                'list': [
                    'list0',
                    'list1'
                ],
                'dict': [
                    {
                        'dict0': {
                            'dict-value': '00'
                        }
                    },
                    {
                        'dict1': {
                            'dict-value': '10'
                        }
                    }
                ],
                'wrapped': '{single}',
                'double-wrapped': '{wrapped}'
            }
        }
        mocked_component = mock.Mock()
        registry.get_component = mock.Mock(return_value=mocked_component)

# Path: grafana_dashboards/components/projects.py
# class Project(ComponentBase):
#     def __init__(self, data, registry):
#         super(Project, self).__init__(data, registry)
#         self._placeholders = [placeholder for dashboard in self._get_dashboard_names()
#                               for placeholder in get_placeholders(dashboard)]
# 
#     def _get_dashboard_names(self):
#         return self.data.get('dashboards', [])
# 
#     def get_dashboards(self):
#         return [self.registry.get_component(Dashboard, dashboard_name) for dashboard_name in
#                 self._get_dashboard_names()]
# 
#     def get_contexts(self, context=None):
#         if context is None:
#             context = {}
#         data = self.data.copy()
#         data.update(context)
#         return Context.create_context(data, self._placeholders)


# Path: tests/grafana_dashboards/components/test_projects.py
import mock
from grafana_dashboards.components.projects import Project

                'dashboards': [
                    'dashboard0',
                    'dashboard1',
                    '{single}',
                    '{dict}',
                    '{list}'
                ],
                'single': 'first',
                'list': [
                    'list0',
                    'list1'
                ],
                'dict': [
                    {
                        'dict0': {
                            'dict-value': '00'
                        }
                    },
                    {
                        'dict1': {
                            'dict-value': '10'
                        }
                    }
                ],
                'wrapped': '{single}',
                'double-wrapped': '{wrapped}'
            }
        }
        mocked_component = mock.Mock()
        registry.get_component = mock.Mock(return_value=mocked_component)

        project = Project(data, registry)