learningequality/ka-lite — pull request #313 by bcipolli (2013-07-26 17:40:50+00:00)
Title: __unicode__ support for unicode characters

See issue #310 for some detail.

Background:
We/Django use __unicode__ to convert models to strings. These functions should return unicode strings that support properties set with characters that are unicode.

Current behavior:
* Some models (e.g. DeviceZone) fail to expect unicode strings, and barf on __unicode__ with properties that contain unicode.
* Some other models make assumptions about whether they are saved or cleaned, which I hit during unit testing.

Changes (More than I expected, unfortunately):
* Make sure all __unicode__ functions use formatting strings using "u" prefix
* Make tests to test __unicode__ functions for all relevant models.
* Remove some of the assumptions (though not all--see #311) about cleaned / saved state, particularly in sign() and __unicode__, but not yet in get_uuid()