Adding initial test for rtmbot and hopefully coveralls

This commit is contained in:
Jeff Ammons 2016-05-01 16:24:16 -07:00
parent 60b7b2ebad
commit ef76bd58d2
6 changed files with 53 additions and 5 deletions

20
tests/test_rtmbot_core.py Normal file
View 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/')
)