コード例 #1
0
def test__should_recover_w_unavailable():
    from google.api_core.exceptions import ServiceUnavailable
    from google.cloud.firestore_v1.watch import _should_recover

    exception = ServiceUnavailable("testing")

    assert _should_recover(exception)
コード例 #2
0
ファイル: test_watch.py プロジェクト: yvdjee/python-firestore
    def _callFUT(self, exception):
        from google.cloud.firestore_v1.watch import _should_recover

        return _should_recover(exception)
コード例 #3
0
def test__should_recover_w_non_recoverable():
    from google.cloud.firestore_v1.watch import _should_recover

    exception = ValueError("testing")

    assert not _should_recover(exception)