Opened 16 years ago

Closed 16 years ago

#7534 closed (fixed)

Django test suite needs charset UTF8 in test database

Reported by: Peter Melvyn <peter.melvyn@…> Owned by: nobody
Component: Testing framework Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In settings, there is the parameter TEST_DATABASE_CHARSET, which should be used to define default character set for test database. IMHO it should be highlighted in the Chapter "Contributing to Django".

Attachments (3)

contributions_mysql_charset.patch (649 bytes ) - added by Peter Melvyn <peter.melvyn@…> 16 years ago.
no-test-db-setting-result.txt (21.9 KB ) - added by Peter Melvyn <peter.melvyn@…> 16 years ago.
Charset is not specified in test settings
utf8-test-db-setting-result.txt (6.6 KB ) - added by Peter Melvyn <peter.melvyn@…> 16 years ago.
settings.TEST_DATABASE_CHARSET=UTF8

Download all attachments as: .zip

Change History (7)

by Peter Melvyn <peter.melvyn@…>, 16 years ago

comment:1 by Bastian Kleineidam <calvin@…>, 16 years ago

I wonder which tests are failing. Can you provide some error messages?

by Peter Melvyn <peter.melvyn@…>, 16 years ago

Charset is not specified in test settings

by Peter Melvyn <peter.melvyn@…>, 16 years ago

settings.TEST_DATABASE_CHARSET=UTF8

comment:2 by Peter Melvyn <peter.melvyn@…>, 16 years ago

Charset and collation of default MySQL 5.x installation is LATIN1 and LATIN1_SWEDISH_CI. If charset UTF8 is not specified for Django tests, then custom_pk and serializers test fail.
See attached files no-test-db-settings-result.txt (under default conditions) and utf8-test-db-settings-result.txt (having specified in settings.TEST_DATABASE_CHARSET=UTF8 - all UTF8 related errors has disappeared). Tested with InnoDB engine on MySQL 5.0.37-community-nt.

comment:3 by Sung-jin Hong, 16 years ago

Component: UncategorizedUnit test system
Triage Stage: UnreviewedAccepted

comment:4 by Russell Keith-Magee, 16 years ago

Resolution: fixed
Status: newclosed

(In [7916]) Fixed #7534 -- Added a note about TEST_DATABASE_CHARSET in the contribution documentation. Thanks to Peter Melvyn for the suggestion and initial draft.

Note: See TracTickets for help on using tickets.
Back to Top