harbor run -t openthoughts/tasktrove-mix-h10-reward-binary-v2-mix-h10-binary-2643
harbor download openthoughts/tasktrove-mix-h10-reward-binary-v2-mix-h10-binary-2643
solution file
import os import unittest from pyspark.sql import SparkSession from spark_ai.webapps.slack import SlackUtilities from tests import BaseUnitTest class TestSlackUtilities(BaseUnitTest): _token = None _path_tmp = '/tmp/slack_data/' _limit = 100 def _init_slack(self, limit: int = _limit) -> SlackUtilities: return SlackUtilities( token=self._token, spark=self.spark, path_tmp=self._path_tmp, limit=limit ) def setUp(self): super().setUp() self.spark = SparkSession.builder.master('local[1]').getOrCreate() self._token = os.getenv('SLACK_TOKEN') def test_read_channels(self): slack = self._init_slack() df_channels = slack.read_channels() self.assertIn('id', df_channels.columns) self.assertIn('name', df_channels.columns) self.
Complete the code above, taking into account the cross-file context provided. Your solution must work correctly with the related files in the project.
Place your complete solution in /app/solution.py
/app/solution.py