MCPcopy Index your code
hub / github.com/wechaty/python-wechaty / test_accessory_read_initialized_instance

Function test_accessory_read_initialized_instance

tests/accessory_test.py:141–159  ·  view source on GitHub ↗

should get expected value by reading instance wechaty & puppet after init

(
        user_class: Type[Accessory],
)

Source from the content-addressed store, hash-verified

139
140
141def test_accessory_read_initialized_instance(
142 user_class: Type[Accessory],
143) -> None:
144 """
145 should get expected value by reading instance wechaty & puppet after init
146 """
147
148 user_class.set_puppet(EXPECTED_PUPPET1)
149 user_class.set_wechaty(EXPECTED_WECHATY1)
150
151 # reveal_type(accessory_class)
152 accessory_instance = user_class()
153
154 assert \
155 accessory_instance.puppet == EXPECTED_PUPPET1, \
156 'should get puppet back'
157 assert \
158 accessory_instance.wechaty == EXPECTED_WECHATY1, \
159 'should get wechaty back'
160
161
162def test_accessory_set_twice(

Callers

nothing calls this directly

Calls 2

set_puppetMethod · 0.80
set_wechatyMethod · 0.80

Tested by

no test coverage detected