Commit Graph

671 Commits

Author SHA1 Message Date
Tim Abbott
ec850e3053 Revert "tests: Skip test_get_old_messages_with_search_pgroonga."
This reverts commit 8ae7e7b451.

We believe this issue may have been fixed in
e80279c2e4.
2016-09-18 20:26:35 -07:00
Tim Abbott
8ae7e7b451 tests: Skip test_get_old_messages_with_search_pgroonga.
This test fails nondeterministically, apparently due to a problem in
pgroonga itself.
2016-09-17 12:29:24 -07:00
Steve Howell
9c0282139a tests: Add test_serve_s3_error_handling(). 2016-09-17 12:13:07 -07:00
Steve Howell
934385a238 tests: Add test_download_non_existent_file(). 2016-09-17 12:13:07 -07:00
Steve Howell
5c54b53fc0 tests: Add test_file_too_big_failure(). 2016-09-17 12:13:07 -07:00
Steve Howell
ca18b631c5 tests: Add ZephyrTest. 2016-09-17 09:29:09 -07:00
Steve Howell
750720116f tests: Add test_update_realm_api(). 2016-09-17 08:31:23 -07:00
Tim Abbott
2c19719cee test_bugdown: Fix i18n test flakiness with markdown rendering tests.
It appears that the assertRaisesRegexp approach we had before didn't
work properly on some systems, likely due to a bad interact with a
i18n (we haven't definitively determined the cause).
2016-09-16 11:49:52 -07:00
Steve Howell
a036a72db6 bugdown: Raise BugdownRenderingException.
We now raise an exception in bugdown.do_convert() if rendering
fails, to avoid silent failures, and then calling code can convert
the exception to a JsonableError.
2016-09-16 10:01:55 -07:00
Steve Howell
de25f07961 tests: Add BugdownErrorTests. 2016-09-16 10:01:55 -07:00
Steve Howell
c4dd3ba0d3 tests: Add test_illegal_name_changes(). 2016-09-16 09:59:26 -07:00
Steve Howell
ac0a11f098 tests: Add test_report.py.
This is close to 100% coverage, but the js_source_map stuff will be
tricky, and we may just want to eliminate that soon.
2016-09-16 07:01:40 -07:00
Steve Howell
8776cc0e35 Add create_streams_if_needed(). 2016-09-15 10:18:10 -07:00
Steve Howell
e8119b175d tests: Add test_tutorial.py. 2016-09-15 10:15:18 -07:00
Steve Howell
f9cdc63250 tests: Add test_push_api().
We now have 100% coverage on views/push_notifications.py, modulo
some dead code which will be addressed in the next commit.

There were some existing tests in text_external.py, but that
module is really intended for tests that hit external services.

The view is a really simple API that updates a DB table, and the
new test code focuses on error handling and idempotency as well
as the happy path.
2016-09-15 06:39:41 -07:00
Tim Abbott
bc827b2a6f integrations: Add test for integrations context. 2016-09-13 22:31:55 -07:00
Tomasz Kolek
acbfe7e624 Add Librato integration.
Fixes: #68.
2016-09-13 21:55:25 -07:00
umkay
6d4f86f951 Add explanation for test_mit_rendering. 2016-09-13 21:23:57 -07:00
umkay
cd1908d04d Add test for password reset flow. 2016-09-13 18:16:50 -07:00
Tim Abbott
e93a2e990f Fix nondeterministic parsing failures in GoogleLoginTest.
Apparently, in urllib.parse, one need to extract the query string from
the rest of the URL before parsing the query string, otherwise the
very first query parameter will have rest of the URL in its name.

This results in a nondeterministic failure that happens 1/N of the
time, where N is the number of fields marshalled from a dictionary
into the query string.
2016-09-13 18:13:28 -07:00
Tim Abbott
29495b953a Add test for GET /json/users/me/pointer. 2016-09-13 17:30:39 -07:00
Tim Abbott
6d8af06e32 Fix Google oauth2 logging to use %s for strings.
This has more consistent results in Python 2 vs. Python 3.
2016-09-13 17:30:39 -07:00
Tim Abbott
95a348382b Fix nondeterministic failures in GoogleLoginTest. 2016-09-13 17:26:38 -07:00
Tim Abbott
b8bdf1365b tests: Add a Google web authentication test suite. 2016-09-13 17:08:14 -07:00
Tim Abbott
4a2282a837 tests.py: Fix missing import needed for mypy. 2016-09-13 17:08:14 -07:00
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