コード例 #1
0
def test_parse_topic_without_arguments():
    channel_name, topic = parse_topic_command('/topic')

    assert channel_name is None
    assert topic is None
コード例 #2
0
def test_parse_topic_with_channel_and_text():
    channel_name, topic = parse_topic_command(
        '/topic #general some topic text')

    assert channel_name == '#general'
    assert topic == 'some topic text'
コード例 #3
0
def test_parse_topic_with_channel_and_delete():
    channel_name, topic = parse_topic_command('/topic #general -delete')

    assert channel_name == '#general'
    assert topic == ''
コード例 #4
0
def test_parse_topic_with_delete():
    channel_name, topic = parse_topic_command('/topic -delete')

    assert channel_name is None
    assert topic == ''
コード例 #5
0
def test_parse_topic_with_channel():
    channel_name, topic = parse_topic_command('/topic #general')

    assert channel_name == '#general'
    assert topic is None
コード例 #6
0
def test_parse_topic_with_text():
    channel_name, topic = parse_topic_command('/topic some topic text')

    assert channel_name is None
    assert topic == 'some topic text'
コード例 #7
0
def test_parse_topic_with_text_with_newline():
    channel_name, topic = parse_topic_command('/topic some topic text\nsecond line')

    assert channel_name is None
    assert topic == 'some topic text\nsecond line'
コード例 #8
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_with_channel_and_delete():
    channel_name, topic = parse_topic_command('/topic #general -delete')

    assert channel_name == 'general'
    assert topic == ''
コード例 #9
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_without_arguments():
    channel_name, topic = parse_topic_command('/topic')

    assert channel_name is None
    assert topic is None
コード例 #10
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_with_channel():
    channel_name, topic = parse_topic_command('/topic #general')

    assert channel_name == 'general'
    assert topic is None
コード例 #11
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_with_channel_and_text():
    channel_name, topic = parse_topic_command(
        '/topic #general some topic text')

    assert channel_name == 'general'
    assert topic == 'some topic text'
コード例 #12
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_with_delete():
    channel_name, topic = parse_topic_command('/topic -delete')

    assert channel_name is None
    assert topic == ''
コード例 #13
0
ファイル: test_topic_command.py プロジェクト: qguv/config
def test_parse_topic_with_text():
    channel_name, topic = parse_topic_command('/topic some topic text')

    assert channel_name is None
    assert topic == 'some topic text'
コード例 #14
0
def test_parse_topic_with_channel_and_delete():
    channel_name, topic = parse_topic_command("/topic #general -delete")

    assert channel_name == "#general"
    assert topic == ""
コード例 #15
0
def test_parse_topic_with_channel_and_text():
    channel_name, topic = parse_topic_command("/topic #general some topic text")

    assert channel_name == "#general"
    assert topic == "some topic text"
コード例 #16
0
def test_parse_topic_with_channel():
    channel_name, topic = parse_topic_command("/topic #general")

    assert channel_name == "#general"
    assert topic is None