Steve Howell
1dbc94bcd9
annotations: Require a Realm for get_stream().
2016-09-19 18:25:02 -07:00
Steve Howell
feb94a90aa
tests: Add ModelTest class for miscellaneous model tests.
2016-09-19 18:25:02 -07:00
Steve Howell
7d257b03fc
test: Add coverage for Recipient.__unicode__().
2016-09-19 18:25:02 -07:00
Steve Howell
e0d59d9386
dead code: Remove Stream.create().
2016-09-19 18:25:02 -07:00
Steve Howell
a67d17b9f7
tests: Add coverage for RealmFilter.__unicode__().
2016-09-19 14:57:53 -07:00
Steve Howell
5daa2b10d5
tests: Add coverage for RealmEmoji.__unicode__().
2016-09-19 14:57:53 -07:00
Steve Howell
068a783d88
tests: Test creating user with aliased realm.
2016-09-19 14:57:53 -07:00
Steve Howell
2d0d823a59
tests: Add test_fetch_raw_message().
2016-09-19 14:25:21 -07:00
Steve Howell
7d4995ded0
tests: Add test_render_message_api().
2016-09-19 14:25:21 -07:00
Steve Howell
d0f9374b71
tests: Add test_messages_in_narrow().
2016-09-19 14:25:21 -07:00
Steve Howell
318f8e86a1
tests: Extract _update_tsvector_index().
2016-09-19 14:25:21 -07:00
sunnypalace
3b76a489c9
Remove humbug-user-uploads and related code.
...
Fixes : #1672 .
2016-09-19 10:52:05 -07:00
Steve Howell
e2f7f7b672
tests: Add test_update_alert_words().
2016-09-18 22:08:53 -07:00
Steve Howell
a58cad3093
tests: Extract test_alert_words.py
2016-09-18 22:08:53 -07:00
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
1c37c0e93f
uploads: Remove redir=False codepath for serving S3 files.
...
It does not seem that we need to support this any more. Eliminating
the code gets us to 100% line coverage with our tests on view/uploads.py.
2016-09-17 12:13:07 -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
a630bbf8b8
uploads: Remove dead code in serve_local().
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
152cebf33d
bugdown: Extract log_bugdown_error().
...
(It makes it easier to mock out the logging.)
2016-09-16 10:01:54 -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
6ecee2ac4f
streams: Simplify list_to_streams().
...
The list_to_streams() method now uses create_streams_if_needed() to
do its heavy lifting during the autocreate=True case.
This commit gets us to 100% coverage on the streams view. (The
recently created action.create_streams_if_needed() was easy
to test in isolation, and it has 100% coverage as well, so we are
not cheating here.)
Fixes : #1005 .
2016-09-15 10:18:10 -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
a9e2ceb4e9
push notifications: Fix very minor quirk when adding tokens.
...
When we push a device token, we want to clean out any other user's
tokens on the device, but not the current user's. We were wiping
away our own token, if it existed, before creating it again. This
was probably never a user-facing problem; it just made for dead code
and a little unnecessary DB churn. By excluding the current user
from the delete() call, we exercise the update path in our tests now,
so we have 100% coverage.
2016-09-15 06:40: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
0f4bbc8617
portico: Add options to disable login and about links.
...
This gives us a great deal more flexibility for controlling the
context of the portico footer.
2016-09-13 22:59:09 -07:00
Rishi Gupta
de11e7c1b3
Add support for subdomain URIs to /api and /api/endpoints.
...
To the extent possible, we share code with the already-existing
IntegrationView code path.
2016-09-13 22:31:56 -07:00
Tim Abbott
bc827b2a6f
integrations: Add test for integrations context.
2016-09-13 22:31:55 -07:00
Tim Abbott
f9e41b1387
integrations: Factor out ApiURLView base class.
2016-09-13 22:26:47 -07:00
Tim Abbott
b7ab83c6ec
Move api_endpoint_docs to integrations views file.
2016-09-13 21:58:02 -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
7eb6924841
Wrap dict view object in list for python3 compatibility.
...
Deleting items from a dictionary being iterated through directly
doesn't work properly in Python 3.
2016-09-13 21:21:45 -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
ca91605e85
Extract zerver/views/pointer.py.
2016-09-13 17:30:39 -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
8fe7488074
views: Remove extract_json_response hack for python-requests.
...
Now that we are using a virtualenv for dependencies, we can be
confident we will never be using an old system-installed version of
this library.
2016-09-13 17:08:14 -07:00
Tim Abbott
b8bdf1365b
tests: Add a Google web authentication test suite.
2016-09-13 17:08:14 -07:00