Adding initial test for rtmbot and hopefully coveralls
This commit is contained in:
parent
60b7b2ebad
commit
ef76bd58d2
6 changed files with 53 additions and 5 deletions
20
tests/test_rtmbot_core.py
Normal file
20
tests/test_rtmbot_core.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from testfixtures import LogCapture
|
||||
from rtmbot.core import RtmBot
|
||||
|
||||
|
||||
def test_init():
|
||||
with LogCapture() as l:
|
||||
rtmbot = RtmBot({
|
||||
'SLACK_TOKEN': 'test-12345',
|
||||
'BASE_PATH': '/tmp/',
|
||||
'LOGFILE': '/tmp/rtmbot.log',
|
||||
'DEBUG': True
|
||||
})
|
||||
|
||||
assert rtmbot.token == 'test-12345'
|
||||
assert rtmbot.directory == '/tmp/'
|
||||
assert rtmbot.debug == True
|
||||
|
||||
l.check(
|
||||
('root', 'INFO', 'Initialized in: /tmp/')
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue