Commit graph

5 commits

Author SHA1 Message Date
Tim Abbott 971fabe8ad bots: Simplify automated testing library. 2017-05-24 20:13:25 -07:00
derAnfaenger a85c7a0705 bots: Simplify define bot test. 2017-05-24 19:44:22 -07:00
derAnfaenger 9b67e94ba8 bots: Fix unit tests not running in Vagrant.
`test-bots` would not run in Vagrant, displaying
the error "ValueError: no such test method in <class
'bots_test_lib.BotTestCase'>: runTest" This was due to
the `BotTestCase` class inheriting from the TestCase
class, even though it was not a unit test on its own.

This commit removes the inheritance of TestCase and
specifies `test_define` as the `runTest` method in
`TestDefineBot`.
2017-05-24 19:44:22 -07:00
derAnfaenger e59b9ed897 bots: Make run.py independent from current working path. 2017-05-24 17:34:11 -07:00
Abhijeet Kaur f83ddd658c tests: Add contrib_bots/test-bots file.
This test uses unittest and mock library. It mocks
'BotHandlerApi' class. This test works independent of
the rest of the code outside contrib_bots folder.

Merged with a few changes by tabbott to fix lint issues; we'll need to
do further work on this framework, but since it's not hooked up to
anything, it's reasonable to merge early so others can collaborate on
improving it.
2017-05-24 13:13:03 -07:00