/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_config.py

Formatted unicode config tests as ASCII

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
1
# Copyright (C) 2005 by Canonical Ltd
3
2
#   Authors: Robert Collins <robert.collins@canonical.com>
4
3
#
31
30
 
32
31
sample_long_alias="log -r-15..-1 --line"
33
32
sample_config_text = ("[DEFAULT]\n"
34
 
                      u"email=Erik Bågfors <erik@bagfors.nu>\n"
 
33
                      u"email=Erik B\u00e5gfors <erik@bagfors.nu>\n"
35
34
                      "editor=vim\n"
36
35
                      "gpg_signing_command=gnome-gpg\n"
37
36
                      "log_format=short\n"
308
307
        config_file = StringIO(sample_config_text.encode('utf-8'))
309
308
        my_config = config.GlobalConfig()
310
309
        my_config._parser = my_config._get_parser(file=config_file)
311
 
        self.assertEqual(u"Erik Bågfors <erik@bagfors.nu>",
 
310
        self.assertEqual(u"Erik B\u00e5gfors <erik@bagfors.nu>",
312
311
                         my_config._get_user_id())
313
312
 
314
313
    def test_absent_user_id(self):
601
600
        config_file = StringIO(sample_config_text.encode('utf-8'))
602
601
        (my_config._get_location_config().
603
602
            _get_global_config()._get_parser(config_file))
604
 
        self.assertEqual(u"Erik Bågfors <erik@bagfors.nu>",
 
603
        self.assertEqual(u"Erik B\u00e5gfors <erik@bagfors.nu>",
605
604
                         my_config._get_user_id())
606
605
        branch.control_files.email = "John"
607
606
        self.assertEqual("John", my_config._get_user_id())