Projet

Général

Profil

0002-tests-set-site-charset-to-utf-8.patch

Benjamin Dauvergne, 29 mars 2016 12:58

Télécharger (1,29 ko)

Voir les différences:

Subject: [PATCH 2/3] tests: set site charset to utf-8

 tests/utilities.py | 3 +++
 1 file changed, 3 insertions(+)
tests/utilities.py
76 76
    pub = publisher.WcsPublisher.create_publisher()
77 77
    # allow saving the user
78 78
    pub.app_dir = os.path.join(APP_DIR, 'example.net')
79
    pub.site_charset = 'utf-8'
79 80

  
80 81
    if sql_mode:
81 82
        pub.user_class = sql.SqlUser
......
90 91
        pub.cfg = {}
91 92
        if sql_mode:
92 93
            pub.cfg['postgresql'] = {'database': known_elements.sql_db_name, 'user': os.environ['USER']}
94
        pub.cfg.setdefault('misc', {})['charset'] = 'utf-8'
93 95
        pub.write_cfg()
94 96
        return pub
95 97

  
......
111 113
        cur.close()
112 114

  
113 115
        pub.cfg['postgresql'] = {'database': dbname, 'user': os.environ['USER']}
116
        pub.cfg.setdefault('misc', {})['charset'] = 'utf-8'
114 117
        pub.write_cfg()
115 118

  
116 119
        sql.do_user_table()
117
-