Commit Graph

6796 Commits

Author SHA1 Message Date
Steve Howell
51c78571cc tests: Add HomeTest.test_invites_by_admins_only(). 2016-09-13 16:46:05 -07:00
Steve Howell
7cb8f6421d tests: Add HomeTest.test_new_stream(). 2016-09-13 16:46:05 -07:00
Steve Howell
eced842f4d tests: Add HomeTest.test_notifications_stream(). 2016-09-13 16:46:05 -07:00
Steve Howell
cad12b077f tests: Extract HomeTest._get_page_params(). 2016-09-13 16:46:05 -07:00
Steve Howell
1091b51bb4 tests: Add HomeTest.test_bad_pointer(). 2016-09-13 16:46:05 -07:00
Steve Howell
7f771c64ae tests: Add HomeTest.test_bad_narrow(). 2016-09-13 16:46:05 -07:00
Steve Howell
2bf876d5bb tests: Add HomeTest._sanity_check(). 2016-09-13 16:46:05 -07:00
Steve Howell
dc2dde1509 tests: Add HomeTest.test_terms_of_service(). 2016-09-13 16:46:05 -07:00
Steve Howell
fa4110b1d9 tests: Extract HomeTest._get_home_page(). 2016-09-13 16:46:05 -07:00
Steve Howell
f5f7801302 tests: Extract test_presence.py 2016-09-13 14:51:36 -07:00
Steve Howell
329fa22f22 tests: Add test_mirror_presence(). 2016-09-13 14:42:18 -07:00
Steve Howell
7f94c74bf8 tests: Add test_invalid_presence(). 2016-09-13 14:36:47 -07:00
Steve Howell
edf7ea7f51 tests: Add make_client() test helper. 2016-09-13 14:32:59 -07:00
Steve Howell
4c5eb3d06e Fix transaction behavior for update_subscriptions_backend().
This commit extracts compose_views() from update_subscriptions_backend(),
and it implements the correct behavior for forcing transactions to roll
back, which is to raise an exception.

There were really three steps in this commit:

- Extract buggy code to compose_views().
- Add tests on compose_views().
- Fix bugs exposed by the new tests by converting errors to exceptions.
2016-09-12 22:03:39 -07:00
Umair Khan
593779a3b0 Annotate zerver/tests/test_push_notifications.py. 2016-09-12 08:10:50 -07:00
Steve Howell
43572486b2 Annotate test_export.read_file(). 2016-09-11 17:15:35 -07:00
Tomasz Kolek
8b9e9a386a Add mypy annotations to various integrations-related functions.
Added to:
zerver/lib/integrations.py
zerver/tests/test_integrations.py
zerver/tests/test_management_commands.py
zerver/views/integrations.py
zerver/views/webhooks/circleci.py
2016-09-11 17:11:25 -07:00
Tim Abbott
3a64074e8b test_signup: Annotate some recently added functions. 2016-09-10 11:57:07 -07:00
Tim Abbott
a7fe22f4ec Add Zulip version number to page_params. 2016-09-08 15:29:24 -07:00
Tomasz Kolek
848635005f Add Sentry integration.
Fixes: #618.
2016-09-07 19:39:45 -07:00
ashishk1994
329f52668d Add test_set_color_unsubscribed_stream_name.
Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-09-07 19:10:12 -07:00
Ashish Kumar
c9b81379b6 Add test_bot_add_subscriptions().
Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-09-07 19:10:12 -07:00
Tim Abbott
0e5926ea02 tests: remove full database query pgroonga test.
This test seemed to be occasionally flaky (with the query changing by
1 character), and it's not clear it had a lot of value in the first
place.
2016-08-27 10:25:42 -07:00
Kouhei Sutou
683f49aa99 Support full text search for all languages using pgroonga.
This adds support for using PGroonga to back the Zulip full-text
search feature.  Because built-in PostgreSQL full text search doesn't
support languages that don't put space between terms such as Japanese,
Chinese and so on. PGroonga supports all languages including Japanese
and Chinese.

Developers will need to re-provision when rebasing past this patch for
the tests to pass, since provision is what installs the PGroonga
package and extension.

PGroonga is enabled by default in development but not in production;
the hope is that after the PGroonga support is tested further, we can
enable it by default.

Fixes #615.

[docs and tests tweaked by tabbott]
2016-08-26 21:04:03 -07:00
Tomasz Kolek
69a9fece70 Add GitLab integration.
Fixes: #33.
2016-08-25 13:49:51 -07:00
Tim Abbott
797a7ef97b notifications: Don't spoof emails as from users by default.
The previous default configuration resulted in delivery problems if
the Zulip server was authorized in the SPF records for the domains of
all users on the Zulip server.
2016-08-24 14:10:52 -07:00
Tim Abbott
e3affe96a5 subdomains: Use subdomain host in password reset emails. 2016-08-22 22:39:52 -07:00
Steve Howell
cd2e36d66f export: Add lib.utils.query_chunker(). 2016-08-22 19:27:32 -07:00
Steve Howell
fd6ee7117f tests: Renamed AuthedTestCase to ZulipTestCase. 2016-08-22 19:07:44 -07:00
Tim Abbott
95fbd5ba31 Update zulip.com/integrations link to point to zulipchat.com.
zulip.com will stop running at some point in the near future, and we
don't want these links to break.
2016-08-22 17:26:41 -07:00
Brock Whittaker
6936d49202 Live update new avatars across users.
This sends an event when a new avatar is uploaded that refreshes the
avatar for all browser clients without the need to reload the browser.

Fixes: #1359.
2016-08-18 15:32:29 -07:00
Steve Howell
552a6dc017 tests: Add DocPageTest. 2016-08-18 13:28:58 -07:00
Steve Howell
d1c34a6618 tests: Fix test_create_user_backend().
It was passing in a UserProfile object to client_put(),
which is unnecessary and can break the url coverage
report.
2016-08-18 13:28:58 -07:00
Steve Howell
c12bd853f7 export: Add basic export tests. (fixes #1584) 2016-08-16 13:38:37 -07:00
Tim Abbott
bfa987f26e Add missing realm_uri and server_uri to HomeTest. 2016-08-13 16:52:56 -07:00
Tim Abbott
ed01842f95 notifications: Fix missed message emails with multiple senders.
Previously, missed message emails with multiple senders would
incorrectly have a "," outside the quoted sender name part of the from
address string, resulting in confusing email output.
2016-08-12 12:28:06 -07:00
Tim Abbott
386c6c2a31 settings: Refactor SYSTEM_ONLY_REALMS configuration. 2016-08-12 12:12:53 -07:00
Umair Khan
af9f308f0e Send double columned language list in page_params. 2016-08-10 16:19:28 -07:00
Umair Khan
73e5289736 Add default_language_name in page_params. 2016-08-10 16:19:28 -07:00
Rag Sagar
2fef36f15a Add realm-level default language setting.
Adds a new field default language in the zerver_realm model.
This realm level default language will be used as default language
for newly created users. Realm level default language can be
changed from the administration page.

Fixes #1372.
2016-08-09 17:38:29 -07:00
Umair Khan
86920a297c Mock out loggers in push notification tests.
Fixes: #1575
2016-08-09 22:16:09 +05:00
Umair Khan
7a84f12a38 Verify mock calls without strict order.
In push notification tests, call assert_has_calls with `any_order=True`
so that the order of the calls does not matter.
2016-08-09 22:15:37 +05:00
Tim Abbott
42b63f5caa test_templates: Fix failure to report a user-facing error. 2016-08-09 09:54:44 -07:00
Tim Abbott
f3365f4089 test_templates: Add integrations_dict to context.
This fixes the fact that this test was (silently) failing.
2016-08-09 09:54:36 -07:00
Umair Khan
8c249f859e Push Notification: Add tests for GCM. 2016-08-09 16:13:02 +05:00
Umair Khan
9c13e9a072 Annotate test_push_notifications. 2016-08-08 15:17:02 -07:00
Umair Khan
35dd1ffb13 Pass password as string to authenticate. 2016-08-08 15:17:01 -07:00
Umair Khan
266c791e64 Email should be a unicode. 2016-08-08 15:17:01 -07:00
Umair Khan
503ad774f5 Tokens should be unicode. 2016-08-08 15:17:01 -07:00
Umair Khan
0dfc757447 Annotate test_auth_backends.py. 2016-08-08 15:12:12 -07:00