~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/database/tests/test_transaction_policy.py

  • Committer: Gavin Panella
  • Date: 2011-12-23 14:42:56 UTC
  • mto: This revision was merged to the branch mainline in revision 14641.
  • Revision ID: gavin.panella@canonical.com-20111223144256-ybw0l1o5h9qxb6va
Do as the docstring says in TestTransactionPolicy.writeToDatabaseAndCommit().

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
        :return: A token that `hasDatabaseBeenWrittenTo` can look for.
48
48
        """
49
 
        self.writeToDatabase()
 
49
        name = self.writeToDatabase()
50
50
        transaction.commit()
 
51
        return name
51
52
 
52
53
    def hasDatabaseBeenWrittenTo(self, test_token):
53
54
        """Is the object made by `writeToDatabase` present in the database?