28 lines
726 B
Python
28 lines
726 B
Python
import unittest
|
|
import pandas as pd
|
|
from block import __main__
|
|
|
|
|
|
data = [{
|
|
# "application_key": "0A123C7F-BE45-4912-8E22-0904707325E7",
|
|
"hd_score_m1": 1211,
|
|
"cluster_size_users_v2": 2,
|
|
"target_connected_30_sum": 0,
|
|
"email_cnt": 1,
|
|
"rejected_app_count": 2,
|
|
"app_dt_day_cnt": 2,
|
|
"cluster_size": 3
|
|
}]
|
|
|
|
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_g1", blockResult, "Result dictionary should contain 'hd_score_g1' if success.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|