From f1dee59e8650d02a8476f8c4f972759c6b998a15 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 13 Nov 2018 08:18:48 -0500 Subject: [PATCH] Ajust sys tests: don't passing explicit 'exists' to update. --- firestore/tests/system.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/firestore/tests/system.py b/firestore/tests/system.py index 4827ca5e08d40..62ea42c7ed0e1 100644 --- a/firestore/tests/system.py +++ b/firestore/tests/system.py @@ -202,8 +202,7 @@ def test_document_integer_field(client, cleanup): document.create(data1) data2 = {'1a.ab': '4d', '6f.7g': '9h'} - option2 = client.write_option(exists=True) - document.update(data2, option=option2) + document.update(data2) snapshot = document.get() expected = { '1a': { @@ -311,9 +310,8 @@ def test_update_document(client, cleanup): assert document_id in exc_info.value.message # 1. Try to update before the document exists (now with an option). - option1 = client.write_option(exists=True) with pytest.raises(NotFound) as exc_info: - document.update({'still': 'not-there'}, option=option1) + document.update({'still': 'not-there'}) assert exc_info.value.message.startswith(MISSING_DOCUMENT) assert document_id in exc_info.value.message @@ -327,8 +325,7 @@ def test_update_document(client, cleanup): }, 'other': True, } - option2 = client.write_option(exists=False) - write_result2 = document.update(data, option=option2) + write_result2 = document.create(data) # 3. Send an update without a field path (no option). field_updates3 = {'foo': {'quux': 800}}