/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/per_workingtree/test_mkdir.py

  • Committer: Martin von Gagern
  • Date: 2010-04-20 08:47:38 UTC
  • mfrom: (5167 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5195.
  • Revision ID: martin.vgagern@gmx.net-20100420084738-ygymnqmdllzrhpfn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program; if not, write to the Free Software
16
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
18
"""Tests for interface conformance of 'workingtree.put_mkdir'"""
19
19
 
20
 
from bzrlib.tests.workingtree_implementations import TestCaseWithWorkingTree
 
20
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
21
21
 
22
22
 
23
23
class TestMkdir(TestCaseWithWorkingTree):
24
24
 
25
25
    def test_mkdir_no_id(self):
26
26
        t = self.make_branch_and_tree('t1')
 
27
        t.lock_write()
 
28
        self.addCleanup(t.unlock)
27
29
        file_id = t.mkdir('path')
28
30
        self.assertEqual('directory', t.kind(file_id))
29
31
 
30
32
    def test_mkdir_with_id(self):
31
33
        t = self.make_branch_and_tree('t1')
 
34
        t.lock_write()
 
35
        self.addCleanup(t.unlock)
32
36
        file_id = t.mkdir('path', 'my-id')
33
37
        self.assertEqual('my-id', file_id)
34
38
        self.assertEqual('directory', t.kind(file_id))