本文整理汇总了Python中base.Base方法的典型用法代码示例。如果您正苦于以下问题:Python base.Base方法的具体用法?Python base.Base怎么用?Python base.Base使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base
的用法示例。
在下文中一共展示了base.Base方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def setUp(self, mock_call_api, mock_get_channel_group_info, mock_filter):
self.script_dir = os.path.dirname(__file__)
with open('{}/responses/users.json'.format(self.script_dir)) as user_json_file:
mock_call_api.return_value = json.load(user_json_file)
mock_get_channel_group_info.return_value = "C024BE91L", "channels"
mock_filter.return_value = "U01B12FDS"
self.resource = base.Base(token="token",
channel="testChannel",
bot_name="theBender",
working_dir="/test",
grammar="grammar",
path="bender_path",
reply="testing 1.2.3",
slack_unread=True)
示例2: test_mandatory
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def test_mandatory(self, mock_call_api, mock_get_channel_group_info, mock_filter, mock_fail_unless):
def fake_fail_unless(c, m):
if not c:
raise OSError
self.script_dir = os.path.dirname(__file__)
with open('{}/responses/users.json'.format(self.script_dir)) as user_json_file:
mock_call_api.return_value = json.load(user_json_file)
mock_get_channel_group_info.return_value = "C024BE91L", "channels"
mock_filter.return_value = "U01B12FDS"
mock_fail_unless.side_effect = fake_fail_unless
self.assertRaises(OSError, base.Base, token="token",
channel="testChannel",
bot_name="theBender",
mention=False,
grammar=False)
示例3: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'openstack-nova'
示例4: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'openstack-cinder'
示例5: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'openstack-glance'
示例6: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'openstack-neutron'
示例7: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'openstack-keystone'
示例8: __init__
# 需要导入模块: import base [as 别名]
# 或者: from base import Base [as 别名]
def __init__(self):
base.Base.__init__(self)
self.prefix = 'ceph'