def test_with_deleted_project(self): query_params = SnubaQueryParams( dataset=Dataset.Events, filter_keys={"project_id": [self.project.id]}) self.project.delete() with pytest.raises(UnqualifiedQueryError): get_query_params_to_update_for_projects(query_params)
def test_with_some_deleted_projects(self, mock_project): other_project = self.create_project(organization=self.organization, slug="a" * 32) query_params = SnubaQueryParams( dataset=Dataset.Events, filter_keys={"project_id": [self.project.id, other_project.id]} ) other_project.delete() organization_id, _ = get_query_params_to_update_for_projects(query_params) assert organization_id == self.organization.id