zulip/zephyr
Jessica McKellar cc8ee68514 tests: assert that text objects are instances of basestring, since they might be str or unicode.
This fixes tests that have been failing for me for, well, months, that
I've been ignoring:

======================================================================
FAIL: test_successful_subscriptions_list (zephyr.tests.SubscriptionAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jesstess/dev/humbug/zephyr/tests.py", line 631, in test_successful_subscriptions_list
    self.assertIsInstance(stream['name'], str)
AssertionError: u'Denmark' is not an instance of <type 'str'>

======================================================================
FAIL: test_get_stream_colors (zephyr.tests.SubscriptionPropertiesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jesstess/dev/humbug/zephyr/tests.py", line 515, in test_get_stream_colors
    self.assertIsInstance(color,  str)
AssertionError: u'#c2c2c2' is not an instance of <type 'str'>

----------------------------------------------------------------------

The more comprehensive fix to this is going through both our API and
JSON calls and ensuring that we always return unicode objects,
documenting that, and then testing that more specifically. For now, at
least have passing tests.

(imported from commit ed1875ea1f66c1f1e89f80502c0d6abb323dc489)
2013-03-23 00:19:38 -04:00
..
fixtures Rename zephyrs.json => messages.json in .gitignore. 2012-10-10 10:39:27 -04:00
jstemplates Revert "Automatically condense long messages" 2013-03-20 18:45:12 -04:00
lib Always give hashlib.sha1 and friends bytes. 2013-03-23 00:10:10 -04:00
management create_user: ask for realm as part of user creation. 2013-03-23 00:19:37 -04:00
migrations [south] Add rendered_content columns. 2013-03-19 08:09:26 -04:00
static integrations: Document Capistrano integration. 2013-03-22 14:37:54 -04:00
tests tests: Disable tutorial through the server side variable needs_tutorial 2013-03-18 13:46:46 -04:00
__init__.py Initial Django commit: basic account, zephyr stream, narrowing, etc. 2012-08-28 12:44:51 -04:00
context_processors.py [manual] Get rid of the static-access-control mechanism 2013-01-31 15:34:12 -05:00
decorator.py Use TornadoQueueClient for activity queue when in the tornado process 2013-03-22 15:55:49 -04:00
filters.py Filter out all cookies and the csrfmiddlewaretoken. 2013-02-05 16:12:48 -05:00
forms.py Rename is_active to is_inactive. 2013-02-12 16:15:29 -05:00
handlers.py Rewrite internal_send_message to use check_send_message. 2013-03-18 16:15:11 -04:00
middleware.py Add the user's client string to our Django logs. 2013-03-15 16:37:40 -04:00
models.py Always give hashlib.sha1 and friends bytes. 2013-03-23 00:10:10 -04:00
openid.py [manual] Implement backend support for authenticating a user via Google. 2013-02-27 10:16:54 -05:00
retention_policy.py Fix use of case-sensitive comparisons on email addresses. 2013-02-28 17:49:57 -05:00
tests.py tests: assert that text objects are instances of basestring, since they might be str or unicode. 2013-03-23 00:19:38 -04:00
tornado_callbacks.py Send Tornado callback notifications via RabbitMQ 2013-03-22 15:55:40 -04:00
tornadoviews.py Handle Tornado callback notify in a more generic, less HTTP-centric way 2013-03-22 15:51:23 -04:00
views.py Handle Tornado callback notify in a more generic, less HTTP-centric way 2013-03-22 15:51:23 -04:00