def test_launch_eeg(self): """ Tests successful launch of a BrainEEG and that all required keys are present in returned template dictionary """ sensors = TestFactory.get_entity(self.test_project, SensorsEEG()) time_series = self.datatypeFactory.create_timeseries(self.connectivity, 'EEG', sensors) time_series.configure() viewer = DualBrainViewer() viewer.current_project_id = self.test_project.id result = viewer.launch(time_series) for key in TestBrainViewer.EXPECTED_KEYS + TestBrainViewer.EXPECTED_EXTRA_KEYS: assert key in result and result[key] is not None assert result['extended_view']
def test_launch_eeg(self): """ Tests successful launch of a BrainEEG and that all required keys are present in returned template dictionary """ sensors = TestFactory.get_entity(self.test_project, SensorsEEG()) time_series = self.datatypeFactory.create_timeseries( self.connectivity, 'EEG', sensors) time_series.configure() viewer = DualBrainViewer() viewer.current_project_id = self.test_project.id result = viewer.launch(time_series) for key in TestBrainViewer.EXPECTED_KEYS + TestBrainViewer.EXPECTED_EXTRA_KEYS: assert key in result and result[key] is not None assert result['extended_view']
def test_launch_eeg(self, time_series_region_index_factory): """ Tests successful launch of a BrainEEG and that all required keys are present in returned template dictionary """ time_series_index = time_series_region_index_factory(self.connectivity, self.region_mapping, self.test_user, self.test_project) viewer = DualBrainViewer() viewer.current_project_id = self.test_project.id view_model = viewer.get_view_model_class()() view_model.time_series = UUID(time_series_index.gid) view_model.shell_surface = UUID(self.face_surface.gid) result = viewer.launch(view_model) for key in TestBrainViewer.EXPECTED_KEYS + TestBrainViewer.EXPECTED_EXTRA_KEYS: assert key in result and result[key] is not None assert result['extended_view']