diff --git a/pytchat/processors/superchat/calculator.py b/pytchat/processors/superchat/calculator.py index e355c5c..9d9e221 100644 --- a/pytchat/processors/superchat/calculator.py +++ b/pytchat/processors/superchat/calculator.py @@ -14,7 +14,7 @@ items_sticker = [ 'item', 'liveChatPaidStickerRenderer' ] -class Calculator(ChatProcessor): +class SuperchatCalculator(ChatProcessor): """ Calculate the amount of SuperChat by currency. """ diff --git a/tests/test_calculator_get_item.py b/tests/test_calculator_get_item.py index 21bc631..9034b21 100644 --- a/tests/test_calculator_get_item.py +++ b/tests/test_calculator_get_item.py @@ -1,6 +1,6 @@ -from pytchat.processors.superchat.calculator import Calculator +from pytchat.processors.superchat.calculator import SuperchatCalculator -get_item = Calculator()._get_item +get_item = SuperchatCalculator()._get_item dict_test = { 'root':{ diff --git a/tests/test_calculator_parse.py b/tests/test_calculator_parse.py index 16b8f56..f845182 100644 --- a/tests/test_calculator_parse.py +++ b/tests/test_calculator_parse.py @@ -1,8 +1,8 @@ import json from pytchat.parser.live import Parser -from pytchat.processors.superchat.calculator import Calculator +from pytchat.processors.superchat.calculator import SuperchatCalculator from pytchat.exceptions import ChatParseException -parse = Calculator()._parse +parse = SuperchatCalculator()._parse def _open_file(path): @@ -38,7 +38,7 @@ def test_process_0(): 'timeout':10, 'chatdata':load_chatdata(r"tests\testdata\calculator\superchat_0.json") } - assert Calculator().process([chat_component])=={'¥': 6800.0, '€': 2.0} + assert SuperchatCalculator().process([chat_component])=={'¥': 6800.0, '€': 2.0} def test_process_1(): """ @@ -49,7 +49,7 @@ def test_process_1(): 'timeout':10, 'chatdata':load_chatdata(r"tests\testdata\calculator\text_only.json") } - assert Calculator().process([chat_component])=={} + assert SuperchatCalculator().process([chat_component])=={} def test_process_2(): """ @@ -62,7 +62,7 @@ def test_process_2(): 'chatdata':load_chatdata(r"tests\testdata\calculator\replay_end.json") } assert False - Calculator().process([chat_component]) + SuperchatCalculator().process([chat_component]) except ChatParseException: assert True