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

  • Committer: Jelmer Vernooij
  • Date: 2017-06-08 23:30:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170608233031-3qavls2o7a1pqllj
Update imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
class TestDebugFlags(tests.TestCaseInTempDir):
28
28
 
29
29
    def test_set_no_debug_flags_from_config(self):
30
 
        self.assertDebugFlags([], b'')
 
30
        self.assertDebugFlags([], '')
31
31
 
32
32
    def test_set_single_debug_flags_from_config(self):
33
 
        self.assertDebugFlags(['hpss'], b'debug_flags = hpss\n')
 
33
        self.assertDebugFlags(['hpss'], 'debug_flags = hpss\n')
34
34
 
35
35
    def test_set_multiple_debug_flags_from_config(self):
36
 
        self.assertDebugFlags(
37
 
            ['hpss', 'error'], b'debug_flags = hpss, error\n')
 
36
        self.assertDebugFlags(['hpss', 'error'], 'debug_flags = hpss, error\n')
38
37
 
39
38
    def assertDebugFlags(self, expected_flags, conf_bytes):
40
39
        conf = config.GlobalStack()
41
 
        conf.store._load_from_string(b'[DEFAULT]\n' + conf_bytes)
 
40
        conf.store._load_from_string('[DEFAULT]\n' + conf_bytes)
42
41
        conf.store.save()
43
42
        self.overrideAttr(debug, 'debug_flags', set())
44
43
        debug.set_debug_flags_from_config()