/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.152.1 by Vincent Ladeuil
Empty shell
1
# Copyright (C) 2007 Canonical Ltd
2
#
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
0.152.2 by v.ladeuil+lp at free
Add failing tests for basic usage.
17
import os
18
19
0.152.1 by Vincent Ladeuil
Empty shell
20
from bzrlib import tests
21
22
0.152.2 by v.ladeuil+lp at free
Add failing tests for basic usage.
23
class TestUpload(tests.TestCaseWithTransport):
24
25
    def _create_branch(self):
26
        tree = self.make_branch_and_tree('branch')
27
        self.build_tree_contents([('branch/hello', 'foo')])
28
        tree.add('hello')
29
        tree.commit('setup')
30
31
        self.build_tree_contents([('branch/goodbye', 'baz')])
32
        tree.add('goodbye')
33
        tree.commit('setup')
34
        return tree
35
36
    def test_full_upload(self):
37
        self._create_branch()
38
39
        self.run_bzr('upload --full ../upload', working_dir='branch')
40
41
        self.assertFileEqual('foo', '../upload/hello')
42
        self.assertFileEqual('baz', '../upload/goodbye')
43
44
    def test_incremental_upload(self):
45
        self._create_branch()
46
47
        self.run_bzr('upload -r 1 ../upload', working_dir='branch')
48
49
        self.assertFileEqual('foo', '../upload/hello')
50
        self.failIfExists('../upload/goodbye')
51
52
        self.run_bzr('upload ../upload', working_dir='branch')
53
54
        self.assertFileEqual('foo','../upload/hello')
55
        self.assertFileEqual('baz', '../upload/goodbye')