Пример #1
0
def test__should_terminate_w_unavailable():
    from google.api_core.exceptions import Cancelled
    from google.cloud.firestore_v1.watch import _should_terminate

    exception = Cancelled("testing")

    assert _should_terminate(exception)
Пример #2
0
    def _callFUT(self, exception):
        from google.cloud.firestore_v1.watch import _should_terminate

        return _should_terminate(exception)
Пример #3
0
def test__should_terminate_w_non_recoverable():
    from google.cloud.firestore_v1.watch import _should_terminate

    exception = ValueError("testing")

    assert not _should_terminate(exception)