mirror of https://github.com/zulip/zulip.git
bc2ace726c
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) |
||
---|---|---|
.. | ||
fixtures | ||
jstemplates | ||
lib | ||
management | ||
static | ||
static-access-control | ||
tests | ||
__init__.py | ||
context_processors.py | ||
decorator.py | ||
forms.py | ||
middleware.py | ||
models.py | ||
tests.py | ||
views.py |