()
| 8 | from wechaty import Wechaty, WechatyOptions |
| 9 | |
| 10 | def 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 | |
| 25 | def test_scheduler(): |
nothing calls this directly
no test coverage detected