17 lines
606 B
Python
17 lines
606 B
Python
import unittest
|
|
from block import __main__
|
|
|
|
data = {'hd_score_m1': 1173.0, 'hd_score_g1': 1203.0, 'cluster_size_users_v2': 3.0, 'target_connected_30_sum': 0.0, 'email_cnt': 1.0, 'rejected_app_count': 2.0, 'app_dt_day_cnt': 3.0}
|
|
|
|
class TestBlock(unittest.TestCase):
|
|
def test_main_success(self):
|
|
blockResult = __main__(**data)
|
|
|
|
# breakpoint()
|
|
self.assertIsInstance(blockResult, dict, "Result should be a dictionary.")
|
|
self.assertIn("hd_score_s1", blockResult, "Result dictionary should contain 'hd_score_s1' if success.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|