当前位置: 首页>>代码示例>>Python>>正文


Python DITICConfig.email_to_user方法代码示例

本文整理汇总了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']
开发者ID:tomascarvalho,项目名称:ES,代码行数:10,代码来源:test_config.py

示例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]'
开发者ID:tomascarvalho,项目名称:ES,代码行数:10,代码来源:test_config.py

示例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
开发者ID:tomascarvalho,项目名称:ES,代码行数:10,代码来源:test_config.py

示例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
开发者ID:tomascarvalho,项目名称:ES,代码行数:10,代码来源:test_config.py

示例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 == {}
开发者ID:tomascarvalho,项目名称:ES,代码行数:17,代码来源:test_config.py

示例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)
开发者ID:tomascarvalho,项目名称:ES,代码行数:21,代码来源:test_tools.py


注:本文中的ditic_kanban.config.DITICConfig.email_to_user方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。