Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making regression test put()'s transactional. #562

Merged
merged 1 commit into from
Jan 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions regression/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def _get_post(self, id_or_name=None, post_content=None):

def _generic_test_post(self, name=None, key_id=None):
entity = self._get_post(id_or_name=(name or key_id))
datastore.put([entity])
with datastore.Transaction():
datastore.put([entity])

# Register entity to be deleted.
self.case_entities_to_delete.append(entity)
Expand Down Expand Up @@ -146,7 +147,8 @@ def test_save_key_self_reference(self):
entity['fullName'] = u'Full name'
entity['linkedTo'] = key # Self reference.

datastore.put([entity])
with datastore.Transaction():
datastore.put([entity])
self.case_entities_to_delete.append(entity)

query = datastore.Query(kind='Person')
Expand Down