Sarah
bb329b4020
zerver/lib/events: Refactor using UserProfile prop_types and notifications
...
Refactor fetch_initial_state_data to use the UserProfile.property_types
and notifications dictionaries.
2017-05-26 14:55:54 -07:00
Nathan Miller
2311e169ec
mypy: Various strict-optional fixes in zerver.
2017-05-26 10:10:20 -07:00
Ethan
1477a9102d
mypy: Fix return annotation; json_method_not_allowed.
2017-05-25 15:41:44 -07:00
Elliott Jin
8b98b79646
bots: Generate queue events for embedded bots.
2017-05-25 15:00:51 -07:00
Christian Hudon
8ab6a23a30
Fix most strict-optional issues in export.py.
2017-05-24 18:50:59 -07:00
Christian Hudon
1761a3b1c1
mypy: strict optional fixes.
2017-05-24 18:50:59 -07:00
Eklavya Sharma
2f227a97d3
mypy: Make zerver/lib/actions.py pass --strict-optional check.
2017-05-24 18:49:54 -07:00
Eklavya Sharma
1d8c316ff0
mypy: Make email_mirror pass --strict-optional check.
2017-05-24 18:49:54 -07:00
Eklavya Sharma
690b6025fb
mypy: Fix return type of a function.
2017-05-24 18:43:51 -07:00
Christian Hudon
14e871ce9c
Change order of arguments so output_dir is not optional. Helps mypy too.
2017-05-24 17:32:21 -07:00
Tim Abbott
6aaca44e17
tests: Fix str/Text mypy issues in various tests.
2017-05-24 15:19:38 -07:00
Rick Chern
e53d1c3885
tests: Remove get_user_profile_by_email from most tests.
2017-05-24 13:05:19 -07:00
umkay
ccc70445d6
mypy: Fix strict-optional errors for test files.
...
Fix mypy --strict-optional errors in zerver/tests
2017-05-24 12:43:28 -07:00
Eklavya Sharma
bac874b7e3
mypy: Allow None in passwords while creating users.
2017-05-23 21:56:50 -07:00
Eklavya Sharma
cc1937c8d5
mypy: Use Optional with strings where required.
2017-05-23 21:56:50 -07:00
vaibhav
f94c321567
Outgoing Webhook System: Add support for personal message triggers.
2017-05-23 21:35:09 -07:00
Mark Shannon
c7c47fe11d
Replace buggy NotImplemented with NotImplementedError().
2017-05-23 20:33:35 -07:00
Jason Michalski
a22d6d2c2a
test-backend: Enable test coverage in multi-process mode.
...
We enable data_suffix option when creating Coverage instances which
causes the output files to include the hostname, pid, and random id.
Before each run erase is called which clears all existing coverage data
files. And then at the end of the test run use the combine method which
merges the reports.
We collect coverage in the main process which collects data from
imports and also when running in single process mode. In the workers we
collect coverage in run_subsuite. This creates more stats files than
strictly required but I don't see a better place to save the stats when
stopping workers.
Note that this has the side effect of enabling parallel testing in
Travis CI.
2017-05-23 18:25:13 -07:00
Sarah
4c4444b2dc
zerver/lib/actions: Fix PEP8 E712 error.
2017-05-23 16:29:49 -07:00
Andrew Archer
40b3330f2c
actions: Refactor get_user_profile_by_email to get_user.
2017-05-23 15:30:14 -07:00
Vishnu Ks
f5d8e256aa
Add ZulipTestCase.example_email and ZulipTestCase.mit_email function.
2017-05-23 15:27:21 -07:00
Vishnu Ks
789ef217a8
send_email.py: Remove unused get_user_profile_by_email import.
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
Konstantin Gukov
dd76222a3f
Fetch system bots using new get_system_bot function.
...
This eliminate a bunch of uninteresting calls to
get_user_profile_by_email.
2017-05-23 10:30:40 -07:00
vaibhav
c7524f2f38
Outgoing Webhook System: Prevent infinite loops with outgoing webhooks.
2017-05-23 08:20:45 -07:00
vaibhav
53a8b2ac87
Outgoing Webhook System: Add DoRestCall and helper functions
2017-05-23 08:19:16 -07:00
Vishnu Ks
7f06a7fa2a
Add ZulipTestCase.mit_user() function.
2017-05-22 19:02:42 -07:00
Lukasz Prasol
01f7d9d651
zerver/lib/events: Refactor get_user_profile_by_email to get_user.
...
Fixes #4831 .
2017-05-22 17:32:36 -07:00
Vishnu Ks
bdf7c6c02f
models: Add get_user function.
...
This is intended to replace get_user_profile_by_email.
2017-05-22 11:26:44 -07:00
Aditya Bansal
85aa07e2d4
pep8: Add compliance with rule E261 to zerver/lib/upload.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
b7c49299a6
pep8: Add compliance with rule E261 to test_runner.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
e3003653c7
pep8: Add compliance with rule E261 to test_helpers.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
26ff19f005
pep8: Add compliance with rule E261 to zerver/lib/test_classes.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
1f1fbd7648
pep8: Add compliance with rule E261 to zerver/lib/notifications.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
84eadc0562
pep8: Add compliance with rule E261 to zerver/lib/message.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
03e43b78ee
pep8: Add compliance with rule E261 to zerver/lib/html_diff.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
b822e75a4b
pep8: Add compliance with rule E261 to export.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
4c373dde63
pep8: Add compliance with rule E261 to events.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
1a184263b8
pep8: Add compliance with rule E261 to zerver/lib/db.py.
2017-05-18 03:00:32 +05:30
Aditya Bansal
420230b342
pep8: Add compliance with rule E261 to actions.py.
2017-05-18 03:00:32 +05:30
Umair Khan
bc15085098
gcm: Increase retries to 10 while pushing.
2017-05-17 12:14:32 -07:00
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
850519b314
api: Move cross_realm_bots into the register_ret response.
...
This is probably not the right long-term solution to the cross-realm
bots problem (that solution is probably to eliminate cross-realm bots
and replace them with per-realm bots). But in the short term, this
will at least make it possible for mobile apps to interact with these
cross-realm bots using the `realm_user` data set.
2017-05-16 20:23:13 -07:00
Eeshan Garg
5687b2cdc5
webhooks/github*: Support pushing a local branch without commits.
...
Changes made to get_push_commits_event_message in
zerver/lib/webhooks/git.py are common to all Git integrations
that use get_push_commits_event_message. These include github,
github_webhook, gitlab, gogs, bitbucket, bitbucket2. In some
cases (for instance, gitlab), no further changes to gitlab/view.py
will be required to support pushing a local branch without commits;
adding a fixture and tests should suffice.
2017-05-16 23:51:19 -02:30
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
0b2388bda9
push_notifications: Remove DeviceTokenType logic.
...
The syntax wasn't valid on Python 3.5, and the new code is somewhat
more readable anyway.
2017-05-16 12:26:55 -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
286f9a40e7
push_notifications: Bring file to 100% coverage.
2017-05-16 12:26:55 -07:00