本文整理汇总了Python中ditic_kanban.config.DITICConfig.email_to_user方法的典型用法代码示例。如果您正苦于以下问题:Python DITICConfig.email_to_user方法的具体用法?Python DITICConfig.email_to_user怎么用?Python DITICConfig.email_to_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ditic_kanban.config.DITICConfig
的用法示例。
在下文中一共展示了DITICConfig.email_to_user方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_users_list
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_users_list():
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
response = test_config.get_users_list()
assert response == ['Vapi', 'Alex']
示例2: test_get_email_from_user
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_get_email_from_user():
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
response = test_config.get_email_from_user('Vapi')
assert response == '[email protected]'
示例3: test_check_if_email_exist_known_email
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_check_if_email_exist_known_email():
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
response = test_config.check_if_email_exist('[email protected]')
assert response == False
示例4: test_check_if_user_exist_unknown_user
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_check_if_user_exist_unknown_user():
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
response = test_config.check_if_user_exist('Gina')
assert response == False
示例5: test_get_email_limits_unknown_email
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_get_email_limits_unknown_email():
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
test_config.email_limits = {
'[email protected]': {
'new': 7,
'open': 1,
'rejected': 7,
}
}
response = test_config.get_email_limits('[email protected]')
assert response == {}
示例6: test_user_closed_tickets_unknown_email
# 需要导入模块: from ditic_kanban.config import DITICConfig [as 别名]
# 或者: from ditic_kanban.config.DITICConfig import email_to_user [as 别名]
def test_user_closed_tickets_unknown_email():
rt_object = RTApiMock()
rt_object.set_return([
u'id: ticket/887677',
u'owner: [email protected]',
u'subject: create rt dashboard',
u'status: open',
u'priority: 26',
u'cf.{servico}: csc-gsiic',
u'cf.{is - informatica e sistemas}: dir-inbox',
])
test_config = DITICConfig()
test_config.email_to_user = {
'[email protected]': 'Vapi',
'[email protected]': 'Alex',
}
with pytest.raises(ValueError) as value_error:
user_closed_tickets(rt_object, '[email protected]')
assert 'Unknown email/user:' in str(value_error)