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

Function test_constructor

tests/wechaty_test.py:10–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8from wechaty import Wechaty, WechatyOptions
9
10def test_constructor():
11 # remove environment variables
12 os.environ.pop("token", None)
13 os.environ.pop("WECHATY_TOKEN", None)
14
15 with pytest.raises(WechatyPuppetConfigurationError):
16 bot = Wechaty()
17
18 options = WechatyOptions(token='fake-token', endpoint='127.0.0.1:8080')
19 bot = Wechaty(options=options)
20
21 assert bot.puppet.options.token == 'fake-token'
22 assert bot.puppet.options.end_point == '127.0.0.1:8080'
23
24
25def test_scheduler():

Callers

nothing calls this directly

Calls 2

WechatyClass · 0.90
WechatyOptionsClass · 0.90

Tested by

no test coverage detected