18 lines
564 B
Python
18 lines
564 B
Python
import unittest
|
|
from block import __main__
|
|
|
|
data = {'hd_score_m1': 1173.0, 'hd_score_g1': 1203.0, 'hd_score_s1': 1240.0, 'hd_score_s2': 0, 'hd_score_s3': 0}
|
|
|
|
class TestBlock(unittest.TestCase):
|
|
def test_main_success(self):
|
|
# blockResult = main(data)
|
|
blockResult = __main__(**data)
|
|
|
|
# breakpoint()
|
|
self.assertIsInstance(blockResult, dict, "Result should be a dictionary.")
|
|
self.assertIn("hd_score", blockResult, "Result dictionary should contain 'hd_score' if success.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|