/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Aaron Bentley
  • Date: 2009-07-15 13:45:28 UTC
  • mto: This revision was merged to the branch mainline in revision 4538.
  • Revision ID: aaron@aaronbentley.com-20090715134528-00j9j8wy1gsfixxc
Check for malformed transforms before committing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1961
1961
        tt.create_file('contents', trans_id)
1962
1962
        tt.commit(branch, 'message', strict=True)
1963
1963
 
 
1964
    def test_commit_malformed(self):
 
1965
        """Committing a malformed transform should raise an exception.
 
1966
 
 
1967
        In this case, we are adding a file without adding its parent.
 
1968
        """
 
1969
        branch, tt = self.get_branch_and_transform()
 
1970
        parent_id = tt.trans_id_file_id('parent-id')
 
1971
        tt.new_file('file', parent_id, 'contents', 'file-id')
 
1972
        self.assertRaises(errors.MalformedTransform, tt.commit, branch,
 
1973
                          'message')
 
1974
 
1964
1975
 
1965
1976
class MockTransform(object):
1966
1977