/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 tests/test_auto_upload_hook.py

(jelmer) More lazy loading

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import os
18
18
 
19
19
from bzrlib import (
20
 
    branch,
21
20
    tests,
22
21
    )
23
22
 
24
 
from bzrlib.plugins import upload
 
23
from bzrlib.plugins import (
 
24
    upload,
 
25
    )
 
26
from bzrlib.plugins.upload import (
 
27
    cmds,
 
28
    )
25
29
 
26
30
 
27
31
class AutoPushHookTests(tests.TestCaseWithTransport):
42
46
    def setUp(self):
43
47
        super(AutoPushWithLocation, self).setUp()
44
48
        self.make_start_branch()
45
 
        upload.set_upload_auto(self.wt.branch, True)
46
 
        upload.set_upload_location(self.wt.branch, self.get_url('target'))
47
 
        upload.set_upload_auto_quiet(self.wt.branch, 'True')
 
49
        cmds.set_upload_auto(self.wt.branch, True)
 
50
        cmds.set_upload_location(self.wt.branch, self.get_url('target'))
 
51
        cmds.set_upload_auto_quiet(self.wt.branch, 'True')
48
52
 
49
53
    def test_auto_push_on_commit(self):
50
54
        self.failIfExists('target')
60
64
        self.build_tree(['b'])
61
65
        self.wt.add(['b'])
62
66
        self.wt.commit("two")
63
 
        upload.set_upload_auto(self.wt.branch, False)
 
67
        cmds.set_upload_auto(self.wt.branch, False)
64
68
        self.build_tree(['c'])
65
69
        self.wt.add(['c'])
66
70
        self.wt.commit("three")
72
76
    def setUp(self):
73
77
        super(AutoPushWithoutLocation, self).setUp()
74
78
        self.make_start_branch()
75
 
        upload.set_upload_auto(self.wt.branch, True)
 
79
        cmds.set_upload_auto(self.wt.branch, True)
76
80
 
77
81
    def test_dont_push_if_no_location(self):
78
82
        self.failIfExists('target')