Skip to content

Commit

Permalink
feat: Add Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
sorced-jim committed Feb 23, 2024
1 parent ebf1627 commit e07fe10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Empty file added testing/constraints-3.12.txt
Empty file.
20 changes: 15 additions & 5 deletions tests/unit/test__datastore_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,9 @@ def test_w_transaction(stub, datastore_pb2):
)

request = datastore_pb2.CommitRequest.return_value
assert api.commit.future.assert_called_once_with(request)
api.commit.future.assert_called_once_with(
request, metadata=mock.ANY, timeout=mock.ANY
)


@pytest.mark.usefixtures("in_context")
Expand Down Expand Up @@ -1365,7 +1367,9 @@ def test__datastore_allocate_ids(stub, datastore_pb2):
)

request = datastore_pb2.AllocateIdsRequest.return_value
assert api.allocate_ids.future.assert_called_once_with(request)
api.allocate_ids.future.assert_called_once_with(
request, metadata=mock.ANY, timeout=mock.ANY
)


@pytest.mark.usefixtures("in_context")
Expand Down Expand Up @@ -1407,7 +1411,9 @@ def test_read_only(stub, datastore_pb2):
)

request = datastore_pb2.BeginTransactionRequest.return_value
assert api.begin_transaction.future.assert_called_once_with(request)
api.begin_transaction.future.assert_called_once_with(
request, metadata=mock.ANY, timeout=mock.ANY
)

@staticmethod
@pytest.mark.usefixtures("in_context")
Expand All @@ -1432,7 +1438,9 @@ def test_read_write(stub, datastore_pb2):
)

request = datastore_pb2.BeginTransactionRequest.return_value
assert api.begin_transaction.future.assert_called_once_with(request)
api.begin_transaction.future.assert_called_once_with(
request, metadata=mock.ANY, timeout=mock.ANY
)


@pytest.mark.usefixtures("in_context")
Expand Down Expand Up @@ -1463,7 +1471,9 @@ def test__datastore_rollback(stub, datastore_pb2):
)

request = datastore_pb2.RollbackRequest.return_value
assert api.rollback.future.assert_called_once_with(request)
api.rollback.future.assert_called_once_with(
request, metadata=mock.ANY, timeout=mock.ANY
)


def test__complete():
Expand Down

0 comments on commit e07fe10

Please sign in to comment.