Closed
Bug 551910
Opened 16 years ago
Closed 15 years ago
Test DB should always be utf-8
Categories
(addons.mozilla.org Graveyard :: Code Quality, defect)
addons.mozilla.org Graveyard
Code Quality
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wenzel, Unassigned)
Details
(Whiteboard: [z])
We recently added some unicode to our test fixtures, which promptly breaks MySQL (don't get me started on their defaulting to latin1 and a Swedish collation) unless it's manually configured to do utf-8 by default.
After test_utils can handle it (http://github.com/jbalogh/test-utils/issues/issue/1), we should default our test DBs to utf-8 by adding this to the settings file:
diff --git a/settings.py b/settings.py
index b73540e..3090857 100644
--- a/settings.py
+++ b/settings.py
@@ -34,6 +34,8 @@ DATABASES = {
'USER': '',
'PASSWORD': '',
'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'},
+ 'TEST_CHARSET': 'utf8',
+ 'TEST_COLLATION': 'utf8_general_ci',
},
}
Comment 1•16 years ago
|
||
Since we fully override DATABASES in settings_local, putting it in settings.py only helps as documentation.
| Reporter | ||
Comment 2•16 years ago
|
||
(In reply to comment #1)
> Since we fully override DATABASES in settings_local, putting it in settings.py
> only helps as documentation.
That's fine -- those who don't have that problem won't need to bother. But if utf-8 problems do show up, you'll inevitably have to take care of it :)
| Reporter | ||
Comment 3•15 years ago
|
||
This is fixed as suggested in comment 0.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•