black: Reformat skipping string normalization.
This commit is contained in:
parent
5580c68ae5
commit
fba21bb00d
178 changed files with 6562 additions and 4469 deletions
|
@ -13,6 +13,7 @@ directory structure is currently:
|
|||
fixtures/
|
||||
'''
|
||||
|
||||
|
||||
def get_bot_message_handler(bot_name: str) -> Any:
|
||||
# message_handler is of type 'Any', since it can contain any bot's
|
||||
# handler class. Eventually, we want bot's handler classes to
|
||||
|
@ -21,9 +22,11 @@ def get_bot_message_handler(bot_name: str) -> Any:
|
|||
lib_module = import_module('zulip_bots.bots.{bot}.{bot}'.format(bot=bot_name)) # type: Any
|
||||
return lib_module.handler_class()
|
||||
|
||||
|
||||
def read_bot_fixture_data(bot_name: str, test_name: str) -> Dict[str, Any]:
|
||||
base_path = os.path.realpath(os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), 'bots', bot_name, 'fixtures'))
|
||||
base_path = os.path.realpath(
|
||||
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bots', bot_name, 'fixtures')
|
||||
)
|
||||
http_data_path = os.path.join(base_path, '{}.json'.format(test_name))
|
||||
with open(http_data_path, encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue