Rag Sagar
28f0079432
Use a constant to set UserProfile default_language field max_length attribute.
2016-08-09 16:10:24 -07:00
Steve Howell
dd88ffccfd
export: Extract make_raw() in lib/export.py.
2016-08-09 15:58:27 -07:00
Steve Howell
09fa343bdd
export: Use DATE_FIELDS in floatify_datetime_fields.
...
This avoids a little bit of code duplication, plus it should
make it a little easier to add new date fields in the future.
2016-08-09 15:58:27 -07:00
Steve Howell
c14ab3c91f
export: Add annotations to zerver/lib/export.py.
...
I also fixed some small things like removing unnecessary return
statements, and adding a TODO.
In some cases I explicitly cast stuff at run-time to set() or
str() to appease mypy, as well as make it clear to somebody
reading the code that the callee might not respect ordering
or tolerate unicode.
2016-08-09 15:58:27 -07:00
Steve Howell
f18cc4ae3a
export: Added export_avatars_local_helper().
2016-08-09 15:58:27 -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
fe812a89bf
mypy: Type of remote_username should be text_type.
2016-08-09 09:19:24 -07:00
Umair Khan
8c249f859e
Push Notification: Add tests for GCM.
2016-08-09 16:13:02 +05:00
Umair Khan
acd76eb604
Annotate push_notifications.py.
2016-08-08 15:17:02 -07: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
0dd7d0dda1
push_notifications: Change name to 'identifier'.
2016-08-08 15:15:29 -07:00
Umair Khan
fdbd132ba4
Annotate zerver/context_processors.py.
2016-08-08 15:15:29 -07:00
Umair Khan
00eab4e526
Annotate zerver/views/__init__.py.
2016-08-08 15:15:29 -07:00
Umair Khan
25dd1aeb5c
Annotate zerver/lib/actions.py.
2016-08-08 15:13:29 -07:00
Umair Khan
ef62506fb1
Annotate zerver/models.py.
2016-08-08 15:13:29 -07:00
Umair Khan
e34b7a0691
Fix type annotation in message_cache_items.
2016-08-08 15:13:29 -07:00
Umair Khan
ec910d96fc
Annotate zerver/storage.py.
2016-08-08 15:12:12 -07:00
Umair Khan
0dfc757447
Annotate test_auth_backends.py.
2016-08-08 15:12:12 -07:00
Tim Abbott
6264ff7039
Add new Zulip realm import/export tool.
...
The previous export tool would only work properly for small realms,
and was missing a number of important features:
* Export of avatars and uploads from S3
* Export of presence data, activity data, etc.
* Faithful export/import of timestamps
* Parallel export of messages
* Not OOM killing for large realms
The new tool runs as a pair of documented management commands, and
solves all of those problems.
Also we add a new management command for exporting the data of an
individual user.
2016-08-08 14:58:18 -07:00
Tim Abbott
e7adaf8db1
utils: Add mkdir_p implementation.
2016-08-08 14:36:50 -07:00
Tim Abbott
54a6bdc3ad
views: Fix mypy annotations in get_invitee_emails_set.
...
Apparently this buggy annotation slipped through into master.
2016-08-05 15:04:16 -07:00
Tomasz Kolek
64b5d0ce64
Add support for inviting emails in "name" <email> format.
...
Often, users will copy email addresses with a name (rather than pure
email addresses) into the Zulip "invite users" UI. Previously, that
would throw an error.
This change also adds a get_invitee_emails_set function for parsing
emails content and a test suite for this new feature.
Fixes : #1419 .
2016-08-05 14:48:04 -07:00
Umair Khan
d33fc0046f
Add APNS feedback server tests.
2016-08-05 10:36:57 -07:00
Umair Khan
33450d1a0b
Add APNS push notification tests.
2016-08-05 10:36:57 -07:00
Umair Khan
40054ce26c
Add APNS response listener test case.
2016-08-05 10:36:57 -07:00
Umair Khan
df8fc30b75
Create MockRedis class.
...
Redis is not available on Travis and creating a mock Redis server looks
easier than using `mock` module.
2016-08-05 10:36:57 -07:00
Umair Khan
2ab796aeb5
Add tests for APNS message.
2016-08-05 10:36:57 -07:00
Umair Khan
882bb5558b
Push to APNS in a loop.
2016-08-05 10:36:57 -07:00
Umair Khan
4e8ca0a326
Make sure apns response code is an integer.
2016-08-05 10:36:57 -07:00
Umair Khan
5c41eae7ec
Don't send connection to apns response listener.
2016-08-05 10:36:57 -07:00
Umair Khan
ffaf7cb2ba
Create get_connection function for APNS.
2016-08-05 10:36:57 -07:00
Umair Khan
1d2bdfdfb1
Save user id instead of user profile.
2016-08-05 10:36:57 -07:00
Umair Khan
0cac1aa135
For APNS frame identifier generate random int.
2016-08-05 10:36:57 -07:00
Umair Khan
0b5dc56b8d
Redis key expiry should be an integer.
2016-08-05 10:36:57 -07:00
Umair Khan
cbd53fbac8
Don't import OrderedDict.
2016-08-05 10:36:57 -07:00
Umair Khan
0b88deb640
APNS_SANDBOX should be a bool.
...
Fixes : #1480
2016-08-05 10:36:57 -07:00
Tim Abbott
dcb92d41b8
Annotate test_messages.py.
2016-08-04 15:57:04 -07:00
Tim Abbott
39f1024740
test_messages: Fix remaining mypy errors.
2016-08-04 15:57:03 -07:00
Tim Abbott
88550edd9e
Annotate queue_processors.py.
2016-08-04 15:57:03 -07:00
Tim Abbott
4e8054b84a
Refactor queue worker tests to match actual API.
2016-08-04 15:57:03 -07:00
Tim Abbott
1e54897ca7
process_queue: Add missing type annotation.
2016-08-04 15:57:03 -07:00
Tim Abbott
4ddc567c50
views/__init__: Add missing annotations.
2016-08-04 15:57:03 -07:00
Tim Abbott
641aa08721
compilemessages: Add mypy annotations.
2016-08-04 15:57:03 -07:00
Tim Abbott
a787dee48b
makemessages: Add missing annotations and fix string types.
2016-08-04 15:57:03 -07:00