コード例 #1
0
ファイル: publisher_test.py プロジェクト: EsRodriguezP/PubSub
def test_publish_with_error_handler(topic, capsys):

    with _make_sleep_patch():
        with pytest.raises(RuntimeError, match='sigil'):
            publisher.publish_messages_with_error_handler(PROJECT, TOPIC)

    out, _ = capsys.readouterr()
    assert 'Published' in out
コード例 #2
0
def test_publish_with_error_handler(topic, capsys):

    with _make_sleep_patch():
        with pytest.raises(RuntimeError, match='sigil'):
            publisher.publish_messages_with_error_handler(
                PROJECT, TOPIC)

    out, _ = capsys.readouterr()
    assert 'Published' in out
コード例 #3
0
def test_publish_with_error_handler(topic, capsys):
    publisher.publish_messages_with_error_handler(PROJECT, TOPIC)

    out, _ = capsys.readouterr()
    assert 'Published' in out
コード例 #4
0
def test_publish_with_error_handler(topic_publish, capsys):
    publisher.publish_messages_with_error_handler(PROJECT, TOPIC_PUBLISH)

    out, _ = capsys.readouterr()
    assert "Published" in out
コード例 #5
0
def test_publish_with_error_handler(topic_path: str,
                                    capsys: CaptureFixture) -> None:
    publisher.publish_messages_with_error_handler(PROJECT_ID, TOPIC_ID)

    out, _ = capsys.readouterr()
    assert f"Published messages with error handler to {topic_path}." in out
コード例 #6
0
def test_publish_with_error_handler(topic, capsys):
    publisher.publish_messages_with_error_handler(PROJECT, TOPIC)

    out, _ = capsys.readouterr()
    assert 'Published' in out