Skip to content

Commit

Permalink
Merge pull request #562 from dhermes/regression-transactional-puts
Browse files Browse the repository at this point in the history
Making regression test put()'s transactional.
  • Loading branch information
dhermes committed Jan 22, 2015
2 parents 1bfa469 + e407a68 commit 927c534
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 927c534

Please sign in to comment.