Commit Graph

1630 Commits

Author SHA1 Message Date
Tim Abbott
895d4a795b mypy: Fix a missing type annotation. 2017-05-24 12:14:13 -07:00
Umair Khan
9a04fef71b testing: Reset active language.
After running translation tests, we should reset the active
language to isolate the change
2017-05-24 11:35:17 -07:00
Umair Khan
ebb9bd1a6a testing: Avoid class variables to enforce isolation.
Class variables are shared between all instances and as a result
changes made by one instance are leaked to other instances.
2017-05-24 11:35:12 -07:00
Yago González
c0f2036435 api: Handle unregistered users in dev_fetch_api_key.
Fixes #4851.
2017-05-24 09:39:44 -07:00
Andrew Archer
67cf4c4fb4 test_alert_words: Remove use of get_user_profile_by_email. 2017-05-23 22:14:10 -07:00
kb0rg
eb2d0ebd09 Add test for do_deactivate_realm exit if deactivated.
Rename existing test_do_deactivate_realm to indicate test purpose
is to confirm user realm cache clears when a realm is deactivated.
2017-05-23 21:38:07 -07:00
kb0rg
e672ec62c1 Add test for encode_email_address with empty Gateway. 2017-05-23 21:38:07 -07:00
kb0rg
d625cca2f8 minor: Rename test class -> TestEmptyGatewaySetting. 2017-05-23 21:38:07 -07:00
vaibhav
f94c321567 Outgoing Webhook System: Add support for personal message triggers. 2017-05-23 21:35:09 -07:00
Lech Kaiel
6b49e667ef tests: Replaced @zulip.com references with self.example_ functions.
This cleans up the excessive use of @zulip.com emails in the tests.
2017-05-23 20:59:50 -07:00
ron-s
e5d4e0f0eb Test: Add test_notify_of_new_user_internally. 2017-05-23 20:27:37 -07:00
Steve Howell
036f66aba3 Add test_get_avatar_url_with_user_profile_lookup test. 2017-05-23 18:35:45 -07:00
Vishnu Ks
b5c4a95ef1 test_bots.py: Use example_email instead of using the emails directly. 2017-05-23 18:31:43 -07:00
Vishnu Ks
dbdc0220b9 test_presence.py: Remove unused get_user_profile_by_email import. 2017-05-23 18:31:43 -07:00
Vishnu Ks
2b36df6b8f test_sessions.py: Use helpers instead of get_user_profile_by_email. 2017-05-23 15:27:21 -07:00
Vishnu Ks
dafa89d52b test_outgoing_webhook_system.py: Replace get_user_profile_by_email with example_user. 2017-05-23 15:27:21 -07:00
Vishnu Ks
075b0cae70 test_bugdown.py: Remove unused get_user_profile_by_email import. 2017-05-23 15:27:21 -07:00
Vishnu Ks
7950f5242a test_unread.py: Replace get_user_profile_by_email with get_user. 2017-05-23 15:27:21 -07:00
Tim Abbott
a833fa39b8 test_messages: Fix tests failing due to error message change. 2017-05-23 15:27:21 -07:00
Matt Long
19363b2b77 notification_settings: Refactor notification preference settings.
Previously, all notification preference setting had a dedicated test
and setter. Now, all are handled through a modular function using the
property_types framework.
2017-05-23 14:47:46 -07:00
Rick Chern
70d68f7e71 Refactoring: Replace get_user_profile_by_email() in lib/upload.py 2017-05-23 12:37:49 -07:00
Steve Howell
484f32646b Rename file to test_new_users.py.
The old file name of test_send_login_emails was
overly specific, and we want to add some tests
related to other parts of the signup process.
2017-05-23 12:34:44 -07:00
vaibhav
287aaa21b6 Outgoing Webhook System: Add outgoing webhook queue worker. 2017-05-23 08:21:08 -07:00
vaibhav
53a8b2ac87 Outgoing Webhook System: Add DoRestCall and helper functions 2017-05-23 08:19:16 -07:00
Vishnu Ks
820dc9dd9a Replace espuser@mit.edu with mit_user('espuser'). 2017-05-22 19:02:42 -07:00
Vishnu Ks
99fc0e9e62 Replace starnine@mit.edu with mit_user('starnine'). 2017-05-22 19:02:42 -07:00
Vishnu Ks
c680c5f1e8 Replace sipbtest@mit.edu with mit_user('sipbtest'). 2017-05-22 19:02:42 -07:00
Vishnu Ks
05951074be Make MITNameTest use ZulipTestCase instead of TestCase. 2017-05-22 19:02:42 -07:00
Lukasz Prasol
5eaccc550a rate_limit: Make retry-after data machine-readable.
Fixes #4831.
2017-05-22 17:35:12 -07:00
umkay
510b7a0489 mypy: Add ignore type for dynamically added field on LogRecord.
mypy will error because of the attribute "request" on the LogRecord
object. Since this field is added in our tests dynamically and is not
on the base object, for now we will ignore the type.
2017-05-22 14:38:39 -07:00
Tim Abbott
040067b2a2 invite: Remove obsolete bulk_invite_users endpoint. 2017-05-17 17:30:15 -07:00
Aditya Bansal
57bc847874 pep8: Add compliance with rule E261 to test_urls.py. 2017-05-18 03:00:32 +05:30
Umair Khan
38ecc35cd9 push_notifications: Catch IOError while pushing to GCM. 2017-05-17 12:14:32 -07:00
Umair Khan
7e8f4ca4e8 push_notifications: Include GCM in end-to-end test. 2017-05-17 08:09:19 -07:00
Tim Abbott
cab908b664 api: Move notifications_stream into the register_ret API.
While we're at it, we at least fix the API to use a stream ID, not a
stream name, to refer to the notifications stream.
2017-05-16 18:57:14 -07:00
Tim Abbott
9d63a5ab3a push_notification: Delete obsolete DBX_IOS_APP_ID code.
I'm not sure that this was ever actually used, but it's definitely
just clutter for Zulip today.
2017-05-16 12:26:55 -07:00
Umair Khan
fa5c66c439 push_notifications: Add num_push_devices_for_user tests. 2017-05-16 12:26:55 -07:00
Umair Khan
88f5d29e19 push_notifications: Add send_to_push_bouncer tests. 2017-05-16 12:26:55 -07:00
Umair Khan
af27ad607a push_notifications: Add handle_push_notification tests. 2017-05-16 12:26:55 -07:00
Umair Khan
8a6498f55d push_notifications: Create BouncerTestCase.
Adds bounce_request method to simulate a bounce.
2017-05-16 12:26:55 -07:00
Umair Khan
5907877038 push_notifications: Add test for send_notifications_to_bouncer. 2017-05-16 12:26:55 -07:00
Umair Khan
fab4249893 push_notifications: Add get_gcm_payload tests. 2017-05-16 12:26:55 -07:00
Umair Khan
136a950041 push_notifications: Add test for APNs payload. 2017-05-16 12:26:55 -07:00
Umair Khan
47d0f7d996 push_notifications: Add tests for get_alert_from_message. 2017-05-16 12:26:55 -07:00
Umair Khan
df0d29aaff push_notifications: Add response_listener tests. 2017-05-16 12:26:55 -07:00
Steve Howell
e6cc0ffcdd Eliminate PMs to non-subscribers when creating streams.
This should make stream creation relatively fast again, since we
will no longer send O(N) PMs out to tell folks the stream was
created.
2017-05-16 10:43:27 -07:00
Steve Howell
bbd8c1c49b Do not send PMs to subscribers when creating streams.
When we create a stream, we usually send a welcome message on the
stream itself as well as an announcement on the announcement stream,
but we no longer PM the individual users.  Hopefully this will be
more pleasant for users (less spammy), and it also will make creating a
stream a lot faster.

We still send notifications when we add subscribers to an existing
stream.
2017-05-16 08:58:17 -07:00
Steve Howell
e2732dabf3 Send welcome messages as part of /create_realm flow.
We now pre-populate the streams in DEFAULT_NEW_REALM_STREAMS
(social/general/zulip, unless somebody changes settings.py) with
welcome messages.  This makes the streams appear to be active
right away, and it also gives the Zulip realm less of a
blank-slate feeling when you create it.

This change only affects the normal web-based create-realm flow.
It doesn't impact the management commands for creating realms
or setting default streams.
2017-05-15 20:38:08 -07:00
Tim Abbott
97abaae9af home: Remove now-unnecessary page_params_core_fields duplication.
Also, we update the documentation to make the overall system a bit
clearer.

Fixes #4628.
2017-05-13 22:58:18 -07:00
Tim Abbott
acb3c1e7ff test_templates: Fix errors from compare.html template. 2017-05-13 14:57:06 -07:00