Commit Graph

1566 Commits

Author SHA1 Message Date
Tim Abbott
2ec0114079 test_bugdown: Add tests for mentions. 2016-06-03 23:18:39 -07:00
Tim Abbott
cfff4f1d49 test_bugdown: Add a bugdown test for alert_words functionality. 2016-06-03 23:18:39 -07:00
Tim Abbott
8c757292cf test_bugdown: Add test for nonmatching realm filters. 2016-06-03 23:18:39 -07:00
Tim Abbott
3a0eb01dda test_messages: Fix huddle test failing when not on Internet. 2016-06-03 23:18:39 -07:00
Tim Abbott
68fba3579d test_bugdown: Add testing of subject_links feature. 2016-06-03 23:18:39 -07:00
gregmccoy
d77e8df3fa Add tests for zerver/views/realm_emoji.py. 2016-06-03 23:12:53 -07:00
Vishnu Ks
4fd569f910 Change add_default_stream method from PATCH to PUT.
This is more consistent with our other routes.
2016-06-03 09:52:51 -07:00
Nathan Florea
04c71fadc6 More removal of mutable default arguments.
I've left a few that clearly aren't being passed and aren't being mutated, but
I think I've gotten the rest of them.
2016-06-03 09:17:04 -07:00
Tim Abbott
37015fd7c5 Run mypy on zerver/lib/test_auth_backends.py. 2016-06-02 23:01:15 -07:00
Tim Abbott
8cef9675c8 Run mypy on zerver/lib/test_events.py. 2016-06-02 23:00:04 -07:00
Tim Abbott
e6d2b0cdbc Run mypy on zerver/lib/test_unread.py. 2016-06-02 22:59:00 -07:00
Tim Abbott
f3b07ee9aa Run mypy on zerver/lib/test_subs.py. 2016-06-02 22:57:07 -07:00
Rachel Kelly
df36216914 Change instances of 'coworkers' to 'users'.
In order to genericize use of Zulip outside companies,
    all instances of coworkers have been changed to users.
    NOTABLE EXCEPTION: When the Zulip instance is domain-
    locked, the reference to coworkers remains.  The reason
    for this is twofold: first, the majority of Zulip instances
    which require a particular domain will be locked to a
    company, and second, the template variable for the domain
    necessary should be added to the alert so it is clear
    to the user what the domain needs to be for access.

Fixes: #861.
2016-06-02 16:05:27 -07:00
Umair Khan
08fbd57245 [i18n] Make error messages translatable.
Make all strings passing through `json_error` and `JsonableError`
translatable.

Fixes #727
2016-05-31 07:40:42 -07:00
Vishnu Ks
100d885f23 Change default announcement stream to announce.
Fixes #788.
2016-05-31 07:38:07 -07:00
Umair Khan
9a57176ad6 Do shallow testing of backend templates.
Just render the templates without the actual workflow to see if they
don't return a 500 error; this lets us catch various classes of
template bugs automatically.

Fixes #784.
2016-05-31 05:42:17 -07:00
Tim Abbott
572c69f3c2 Move REQ and friends to their own module. 2016-05-30 11:24:17 -07:00
Tomasz Kolek
8c18b8947f Add bot_type field to UserProfile.
This is intended to support creating different types of bots with
potentially limited permissions.
2016-05-19 22:37:37 -07:00
Umair Khan
f9bbc5d6ff Enable i18n support in URL configuration.
This supports i18n using all of the following:
- I18N urls
- Session
- Cookie
- HTTP header
2016-05-19 08:33:30 -07:00
Aristeidis Fkiaras
3ee210d9e8 Add setting to only allow admins create new streams.
Fixes: #691.

Thanks to Preston Hansen for work on this feature!
2016-05-18 18:53:13 -07:00
Tim Abbott
e781136132 Fix subscribing to existing streams when can_create_streams=False.
Previously, a user with can_create_streams=False would be incorrectly
unable to subscribe to streams, whether the streams previously existed
or not.
2016-05-18 18:47:24 -07:00
Tomasz Kolek
c4254497b2 Add WebhookTestCase abstract class for writing webhook tests.
This cuts a ton of code duplication and semi-duplication between the
webhook tests, and thus should make it a lot easier to write new ones.
2016-05-18 14:37:31 -07:00
Umair Khan
dfc58b0ed0 Upgrade digest email templates to Jinja2.
Fixes: #780
2016-05-13 01:01:28 +05:00
Tomasz Kolek
eeeb4d0c92 Add CircleCI integration.
Fixes: #617.
2016-05-11 21:17:37 -07:00
Tim Abbott
f2aee961e1 test_auth_backends: Fix unused variables. 2016-05-10 11:46:39 -07:00
Tim Abbott
92bec8cfea Merge Zulip 1.3.12 security release. 2016-05-10 11:32:26 -07:00
Tim Abbott
620debc5fd Change PrincipalError to return status code 403 by default. 2016-05-10 09:50:57 -07:00
Tim Abbott
85c64c9f93 zulip_login_required: Add checks for active users and realms.
Like the recent change blocking JSON endpoints for deactivated users
and users in deactivated realms, this change is a hardening
improvement.  Those users should be unable to get an active session
anyway, but if somehow one is leaked, this means they won't be able to
access any user data.
2016-05-10 09:50:57 -07:00
Tim Abbott
be216506a9 Improve api_fetch_api_key error messages.
Previously, api_fetch_api_key would not give clear error messages if
password auth was disabled or the user's realm had been deactivated;
additionally, the account disabled error stopped triggering when we
moved the active account check into the auth decorators.
2016-05-10 09:50:57 -07:00
Tim Abbott
52ddd500f0 Add tests for authentication backends. 2016-05-10 09:50:57 -07:00
Tim Abbott
38c82083de Add test suite for deactivated users. 2016-05-10 09:50:57 -07:00
Tim Abbott
df7466e893 Add test suite for deactivate realms. 2016-05-10 09:50:57 -07:00
Tim Abbott
b4ccca300b Add tests for whether API keys appear in initial state data. 2016-05-10 09:50:47 -07:00
Tim Abbott
b869be9301 style: Use 'not in' consistently rather than not foo in. 2016-05-09 17:00:10 -07:00
Tim Abbott
f02571202a EventsRegisterTest: display full error diffs. 2016-05-09 10:12:35 -07:00
Preston Hansen
635828069f Add feature to mark all in stream/topic as read with mouse.
Fixes #736.
2016-05-08 09:02:46 -07:00
Tomasz Kolek
c2de38239e Add payload validation to has_request_variables and REQ tasks.
[with tweaks by tabbott]
2016-05-07 11:54:09 -07:00
rahuldeve
899bfb97ee Add tests for managing uploads in S3. 2016-05-02 22:14:47 -07:00
rahuldeve
01fb6c77a2 Add test for managing files in Local Storage. 2016-05-02 22:14:47 -07:00
rahuldeve
dde832b158 Add Attachment model to keep track of uploads.
This commit adds the capability to keep track and remove uploaded
files.  Unclaimed attachments are files that have been uploaded to the
server but are not referred in any messages.  A management command to
remove old unclaimed files after a week is also included.

Tests for getting the file referred in messages are also included.
2016-05-02 22:14:47 -07:00
Tim Abbott
5bd94c15c7 Use camo to avoid mixed content warnings when displaying emoji. 2016-05-02 17:21:31 -07:00
Tim Abbott
4644967afc dropbox preview: Remove preview_fail.png error condition.
Since we don't have a stable way to get the Dropbox preview failure
image (and it was sorta a weird setup anyway), it seems best to just
remove the condition.
2016-04-29 15:40:52 -07:00
Tim Abbott
4be3c4afd6 Use mocks so we can re-enable Dropbox integration tests. 2016-04-29 15:27:43 -07:00
Ashish Kumar
48be2e33f8 Delete old route for /json/get_public_streams. 2016-04-29 12:57:57 -07:00
Ashish Kumar
b5ab4d45f9 Replace /json/get_public_streams with REST style route. 2016-04-29 12:57:57 -07:00
Antek Grzanka
646ea3214a Add Taiga integration. 2016-04-28 13:44:53 -07:00
Tim Abbott
aebe7334a4 style: Fix missing :s between dict keys and values. 2016-04-27 22:23:40 -07:00
Tim Abbott
02ab03ec7a MITNameTest: Mock network access from Hesiod lookups.
The purpose of these tests is to check the logic, not that DNS is
working on the relevant machine.
2016-04-27 22:23:40 -07:00
Tim Abbott
c9359bd75a test_hooks: Fix missing assert_json_success checks.
Several recently merged webhooks were incorrectly not checking that
the actual webhook result didn't return an error.  While they would
usually still fail in most cases when checking whether the message
came back correctly, this hid the root cause errors and thus made it
much harder to debug.
2016-04-27 13:25:21 -07:00
Vladislav Manchev
f5e6176aea Add custom realm emoji UI to administration page. 2016-04-26 13:15:54 -07:00