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

Function test_accessory_set_twice

tests/accessory_test.py:162–175  ·  view source on GitHub ↗

doc

(
        user_class: Type[Accessory],
)

Source from the content-addressed store, hash-verified

160
161
162def test_accessory_set_twice(
163 user_class: Type[Accessory],
164) -> None:
165 """doc"""
166 user_class.set_puppet(EXPECTED_PUPPET1)
167
168 with pytest.raises(Exception) as exception:
169 user_class.set_puppet(EXPECTED_PUPPET1)
170 assert str(exception.value) == 'can not set _puppet twice'
171
172 user_class.set_wechaty(EXPECTED_WECHATY1)
173 with pytest.raises(Exception) as exception:
174 user_class.set_wechaty(EXPECTED_WECHATY1)
175 assert str(exception.value) == 'can not set _wechaty twice'
176
177
178def test_accessory_classmethod_access_puppet() -> None:

Callers

nothing calls this directly

Calls 2

set_puppetMethod · 0.80
set_wechatyMethod · 0.80

Tested by

no test coverage detected