mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
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`.
This commit is contained in:
@@ -8,14 +8,13 @@ import sys
|
||||
import unittest
|
||||
|
||||
from mock import MagicMock, patch
|
||||
from unittest import TestCase
|
||||
|
||||
from run import get_lib_module
|
||||
from bot_lib import StateHandler
|
||||
from contrib_bots import bot_lib
|
||||
from six.moves import zip
|
||||
|
||||
class BotTestCase(TestCase):
|
||||
class BotTestCase():
|
||||
|
||||
def mock_test(self, messages, message_handler, bot_response):
|
||||
# type: (List[Dict[str, str]], Function) -> None
|
||||
|
||||
Reference in New Issue
Block a user