本文整理匯總了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'