zulip/zephyr
Tim Abbott bc2ace726c Fix bad Django test suite interaction with get_client default.
authenticated_api_view and authenticated_json_view call
update_user_activity with a client generated using
@has_request_variables with a default of e.g. get_client("website").
Because that get_client call only happens once on importing the
module, if those client objects didn't exist previously in the
fixtures, then the first test will generate objects with ids 2 and 3,
and then the second test will dump the database, restore from the
fixtures, and then eventually generate client objects with ids 4 and
5.  But since the default values were only computed at module load,
we'll still end calling add_user_activity with client objects with ids
2 and 3, which don't exist in the newly restored database.

Fix this madness by just making sure those two client objects exist in
the database.

(imported from commit d940e129d077a560d9a0f96ec3daa2e16ce21c8b)
2012-11-28 17:41:39 -05:00
..
fixtures Rename zephyrs.json => messages.json in .gitignore. 2012-10-10 10:39:27 -04:00
jstemplates Temporarily remove user-visible "time travel" UI. 2012-11-21 11:30:56 -05:00
lib bugdown: Use Markdown.reset() instead of re-creating the whole parser 2012-11-20 15:10:15 -05:00
management Fix bad Django test suite interaction with get_client default. 2012-11-28 17:41:39 -05:00
static get_updates: Eliminate the reload_pending parameter. 2012-11-28 17:41:38 -05:00
static-access-control Implement a favicon as a link rel. 2012-11-28 15:12:37 -05:00
tests [schema] Add a management script to create default streams for a domain. 2012-11-28 14:07:16 -05:00
__init__.py Initial Django commit: basic account, zephyr stream, narrowing, etc. 2012-08-28 12:44:51 -04:00
context_processors.py context_processors: Rename misleadingly named unused parameter 2012-11-07 17:46:46 -05:00
decorator.py decorators: Use @has_request_variables to extract client. 2012-11-28 17:41:39 -05:00
forms.py Always allow registration if attempting to register for a non-MIT realm. 2012-11-21 16:42:15 -05:00
middleware.py Log how long requests take to process. 2012-11-14 15:52:57 -05:00
models.py Remove format_delayed_updates_response 2012-11-28 16:36:43 -05:00
tests.py Remove unimplemented test case 2012-11-28 15:28:14 -05:00
views.py Convert server_generation to an int when parsed. 2012-11-28 17:41:39 -05:00