Commit Graph

2859 Commits

Author SHA1 Message Date
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
2b4d59d6e8 Fix comment in update_active_status_backend(). 2016-09-13 14:45:27 -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
Tim Abbott
65321b77ac socket: Switch localhost to 127.0.0.1.
It does the same thing, but is a bit more robust to weird DNS
configurations.
2016-09-13 10:01:57 -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
umkay
82d03d603a Update Pygments to latest upstream version.
In HTML, the line break immediately following a start tag is ignored
(see: https://www.w3.org/TR/html4/appendix/notes.html#h-B.3.1). An
extra span tag has been introduced in the upstream Pygments
HtmlFormatter in order to preserve the first new line. The Bugdown
Tests as well as our fenced_code.js frontend markdown processor have
been updated to reflect this new behavior.
2016-09-12 21:58:25 -07:00
Tim Abbott
e580ed579b Finish annotating zerver/views/messages.py.
These annotations aren't perfect because the sqlalchemy stubs in
typeshed are broken (e.g. a `Select` doesn't have the ability to do
`.where()`, but we've at least used some typevars to make it easy to
address that when the sqlalchemy stubs are less broken).
2016-09-12 08:47:52 -07:00
Tim Abbott
e5b8ad6666 Fix teamcity.py annotations. 2016-09-12 08:30:42 -07:00
Tim Abbott
d964e5595a Finish annotating test_helpers.py. 2016-09-12 08:29:34 -07:00
Steve Howell
cdee3dfb53 Annotate test_helpers.instrument_url(). 2016-09-12 08:21:46 -07:00
Steve Howell
ffec98d85c Annotate zerver/lib/export.py.
This adds the remaining annotations to lib/export.py.
2016-09-12 08:21:46 -07:00
Steve Howell
62dd86bcce mypy: Set Path to str instead of text_type in export.py.
Using text_type for Path just breaks a lot of calls to
the core Python libraries that still want strings.
2016-09-12 08:21:46 -07:00
Umair Khan
593779a3b0 Annotate zerver/tests/test_push_notifications.py. 2016-09-12 08:10:50 -07:00
Umair Khan
c231a440cd Annotate zerver/templatetags/minified_js.py. 2016-09-12 08:10:50 -07:00
Umair Khan
29c24d540f Annotate zerver/templatetags/app_filters.py. 2016-09-12 08:10:50 -07:00
Umair Khan
b4eb3a55be Annotate zerver/management/commands/realm_emoji.py. 2016-09-12 08:10:50 -07:00
Umair Khan
f8c904e611 Annotate zerver/management/commands/deliver_email.py. 2016-09-12 08:10:50 -07:00
Umair Khan
c096473e06 Annotate zerver/management/commands/check_redis.py. 2016-09-12 08:10:50 -07:00
Steve Howell
64cb5d0778 Annotate commands/export.py. 2016-09-11 17:15:35 -07:00
Steve Howell
52c6efa0a8 Annotate commands/export_single_user.py. 2016-09-11 17:15:35 -07:00
Steve Howell
bb6fcaa4e7 Annotate commands/export_usermessage_batch.py. 2016-09-11 17:15:35 -07:00
Steve Howell
85e30a6d35 Annotate commands/import.py. 2016-09-11 17:15:35 -07:00
Steve Howell
43572486b2 Annotate test_export.read_file(). 2016-09-11 17:15:35 -07:00
Steve Howell
30129f609b Annotate client_post() and client_get() in test_helpers. 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
8fbbb3a471 Annotate send_password_reset_email.py. 2016-09-11 17:09:27 -07:00
Tim Abbott
4634aa638e Annotate zerver/lib/tornado_ioloop_logging.py. 2016-09-10 12:10:41 -07:00
Tim Abbott
799c78fbcf Annotate zerver/lib/sqlalchemy_utils.py. 2016-09-10 12:08:37 -07:00
Tim Abbott
2e6aad669c cache: Add a basic annotation for cache_with_key. 2016-09-10 11:57:08 -07:00
Tim Abbott
83ef7e72e6 models: Fix missing mypy annotations in subdomains code. 2016-09-10 11:57:07 -07:00
Tim Abbott
3a64074e8b test_signup: Annotate some recently added functions. 2016-09-10 11:57:07 -07:00
Tim Abbott
e48cdb8d7e Fix python 3 compatibility in logging code.
Detected by mypy.
2016-09-09 15:36:29 -07:00
Tim Abbott
b41fc75767 notifications: Remove unused field from template context.
While one often might want to put the user's name in an email
template, `name` here was the user's full name, not their first name,
and thus reads as quite formal.
2016-09-08 17:03:00 -07:00
Tim Abbott
0d324d38b3 logging: Fix duplicate detection for email errors.
Our implementation of duplication detection in the Zulip email error
reporting system was buggy in two important ways:

* It did not look at the traceback, and thus considered all errors as
  the same.

* It reset the 10-minute duplicate timer every time an error happened,
  thus concealing situations where the same error was occuring more
  often than 1/10 minutes.
2016-09-08 16:55:36 -07:00
Tim Abbott
4423222d92 email_mirror: Add successful processing logging. 2016-09-08 16:54:10 -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
Umair Khan
6a12ad7c33 Don't trust env while accessing Tornado.
This fixes a problem where the requests to Tornado would attempt to
use a configured outgoing HTTP proxy, when really we want to connect
directly to localhost.

Fixes: #468.
2016-09-06 14:17:50 -07:00
Umair Khan
a4466c93a3 Use connection pooling for Django -> Tornado reqs.
Fixes: #391.
2016-09-06 14:15:35 -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
Tomasz Kolek
0e192d6aff Add colors to streams in development server fixtures.
Fixes: #1454.
2016-08-26 22:38:14 -07:00