Eeshan Garg
5d868b1612
webhooks/helloworld: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
6defd7f36e
webhooks/pagerduty: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
36c5e8d11f
webhooks/mention: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
ccd079b425
webhooks/solano: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
c3dda04270
webhooks/zapier: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
6e6c5c8fa6
webhooks/newrelic: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
88ed657412
webhooks/updown: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
a8e4abfb7c
webhooks/teamcity: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
28a2166bd0
webhooks/transifex: Migrate docs to Markdown.
2017-06-01 22:16:12 -07:00
Eeshan Garg
624bab83a7
webhooks: Use append-topic.md for gosquared, greenhouse, hellosign.
2017-06-01 22:16:12 -07:00
Tim Abbott
1f48fa2767
invite: Fix invite_by_admins_only to be enforced in backend.
...
This is CVE-2017-0896.
Apparently, this setting never actually was wired up to anything other
than hiding the UI widget.
Huge thanks to Ibram Marzouk from the HackerOne community for finding
this security bug.
2017-06-01 17:24:29 -07:00
Rohitt Vashishtha
db9918f3d6
bots: Move contrib_bots to api/bots*.
...
This will make it convenient to include these bots in Zulip API
releases on pypi.
Fix #5009 .
2017-06-01 12:31:54 -07:00
Tim Abbott
73f8653da6
test_messages: Increase time allowed for bulk send.
...
This fixes an occasional test flake we've been seeing recently.
2017-06-01 00:00:36 -07:00
Aditya Bansal
a0faf3364a
pep8: Add compliance with rule E261 test_reactions.py.
2017-05-31 17:07:15 -07:00
Aditya Bansal
7bb669ccb4
pep8: Add compliance with rule E261 test_email_mirror.py.
2017-05-31 17:07:15 -07:00
Aditya Bansal
15ea059aad
pep8: Add compliance with rule E261 makemessages.py.
2017-05-31 17:07:15 -07:00
Aditya Bansal
717e5ae393
pep8: Add compliance with rule E261 commands/create_realm.py.
2017-05-31 17:07:15 -07:00
Aditya Bansal
8680c87f56
pep8: Add compliance with rule E261 zerver/lib/push_notifications.py.
2017-05-31 17:07:15 -07:00
Umair Khan
5d794d08dd
test_bulk_message_fetching: Add debug code.
...
This test fails on self.assertTrue(delay < 0.001 * num_ids, error_msg)
randomly. This commit adds debug code to see what the real values of
paramters are.
2017-05-31 09:27:30 -07:00
Eeshan Garg
b309c403e0
webhooks/gitlab: Support Merge Request Hook reopen event.
...
Fixes #4795 .
2017-05-30 22:11:37 -07:00
Umair Khan
71f97b7bcb
testing: Invalidate cache before counting queries.
...
To get accurate count of the queries, we should make sure that
caches don't come into play. If we count queries while caches are
filled, we will get a lower count. Caches are not supposed to be
persistent, so our test can also fail if cache is invalidated
during the course of the unit test.
This commit solves the problem with Stream cache. This cache comes
into play when we use `get_stream` function. If cache is valid,
we will not issue queries to Stream and Recipient table. I think
the problem was one of those rare occasions when the Stream cache
got invalidated during the course of the test, due to which query
count was increased by 2. After this commit, we intentially invalidate
the Stream cache.
2017-05-30 17:28:41 +05:00
K.Kanakhin
2434f2d96c
messages: Add support for admins deleting messages.
...
This makes it possible for Zulip administrators to delete messages.
This is primarily intended for use in deleting early test messages,
but it can solve other problems as well.
Later we'll want to play with the permissions model for this, but for
now, the goal is just to integrate the feature.
Note that it saves the deleted messages for some time using the same
approach as Zulip's message retention policy feature.
Fixes #135 .
2017-05-29 21:59:38 -07:00
Harshit Bansal
298e23b447
realm_emoji.py: Allow an user to delete an emoji uploaded by them.
...
If a realm is configured to allow any user to upload an emoji,
then, an emoji author must be allowed to delete an emoji uploaded
by them.
2017-05-29 20:21:25 -07:00
vaibhav
9cf9837f12
webhooks: Add outgoing webhook bot user to development database.
2017-05-29 16:01:23 -07:00
Tim Abbott
4893779001
test_events: Avoid coverage errors in LogEventsTest.
2017-05-29 15:26:33 -07:00
Maxim Averin
a4c3f571db
Switch change_tos_version to use RealmAuditLog.
2017-05-29 15:24:01 -07:00
Maxim Averin
685fb16c39
Switch change_full_name to use RealmAuditLog.
...
This requires adding an `acting_user` parameter to the
`do_change_bot_owner` function.
2017-05-29 15:22:08 -07:00
Steve Howell
1f4e1ece3a
Fix flaky time-based test.
...
For testing waiting period thresholds, we need to
explicitly set date_joined for Hamlet to be now.
2017-05-29 11:54:06 -06:00
Ron Shafii
8cc1f13d24
test: Add test_notify_realm_of_new_user.
2017-05-28 19:14:52 -07:00
Eeshan Garg
44ec27c122
webhooks/gosquared: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
e5484f1bf5
webhooks/ifttt: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
846e560bfd
webhooks/hellosign: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
372d6a2aa6
webhooks/heroku: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
2d25b6581e
webhooks/greenhouse: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
dd5ce955bd
webhooks/delighted: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
074e3d7401
webhooks/crashlytics: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
14ce3a94db
webhooks/codeship: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
6111b56753
webhooks/circleci: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Eeshan Garg
1c50a85601
webhooks/basecamp: Migrate docs to Markdown.
2017-05-28 18:44:00 -07:00
Ethan Estrada
91e6f00d57
Test that `log_event` auto creates missing log dir.
2017-05-28 18:24:00 -07:00
Ethan Estrada
a11c578d57
Test for early return when "LOG_EVENT_DIR" is `None`.
2017-05-28 18:21:50 -07:00
Tim Abbott
9d7e6b1b48
events: Fix race with realm_waiting_period_threshold changes.
...
The can_create_streams property changed some time ago to depend on 2
different properties of Realm, causing occasional test failures.
2017-05-28 18:21:50 -07:00
Reid Barton
ccb4c5c26f
bots: Move zephyr-related files to api/integrations/zephyr/.
2017-05-26 15:07:02 -07:00
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
Tim Abbott
f5373c46f2
lint: Fix trailing newlines in outgoing webhook tests.
2017-05-25 16:28:11 -07:00
Tim Abbott
8e978df957
mypy: Fix missing import from recent mypy merge.
2017-05-25 16:22:19 -07:00
Ethan
d4d689532d
mypy: serve_local return type to FileResponse.
2017-05-25 15:41:52 -07:00
Ethan
d2e72b0082
mypy: correct process response type.
2017-05-25 15:41:51 -07:00
Ethan
b6e7e36c86
mypy: correct from int to str in rate limiting.
2017-05-25 15:41:49 -07:00
Ethan
d1bd19a1b8
mypy: correct user_passes_test first argument.
2017-05-25 15:41:48 -07:00
Ethan
c284d913cc
mypy: request.body is bytes, should be str.
2017-05-25 15:41:46 -07:00
Ethan
1477a9102d
mypy: Fix return annotation; json_method_not_allowed.
2017-05-25 15:41:44 -07:00
Elliott Jin
4907f24603
bots: Add additional service bot tests.
2017-05-25 15:00:51 -07:00
Elliott Jin
af49a23013
bots: Generalize service bot tests to also test embedded bots.
2017-05-25 15:00:51 -07:00
Elliott Jin
cd8c77bf91
bots: Clean up order and naming of service bot tests.
2017-05-25 15:00:51 -07:00
Elliott Jin
49adeee8c8
bots: Move service bot tests into separate file.
2017-05-25 15:00:51 -07:00
Elliott Jin
8b98b79646
bots: Generate queue events for embedded bots.
2017-05-25 15:00:51 -07:00
Elliott Jin
0ec9e54954
bots: Add queue and QueueProcessingWorker for embedded bots.
2017-05-25 15:00:51 -07:00
Elliott Jin
d0c0031b0b
bots: Add comments about embedded bots to Service model.
2017-05-25 15:00:51 -07:00
Elliott Jin
824b315284
bots: Introduce "service_bot" concept in UserProfile model.
2017-05-25 15:00:51 -07:00
Elliott Jin
120b7b4caf
bots: Add bot_type for embedded bots in UserProfile model.
2017-05-25 15:00:51 -07:00
Elliott Jin
5b4d2832fc
bots: Add management command for making outgoing webhook bot.
2017-05-25 09:45:54 -07:00
umkay
9ab0a8be6a
mypy: Fix strict optional in zerver/views.
2017-05-25 09:30:41 -07:00
Yago González
55b4a3792d
lint: Fix violation in the GitHub webhook view.
2017-05-24 22:09:14 -07:00
umkay
f4617d0408
mypy: Fix a few webhook tests to work with strict-optional.
2017-05-24 20:31:21 -07:00
Vishnu Ks
bb98e35aa0
Replace othello@zulip.com with example_email('othello').
2017-05-24 19:37:36 -07:00
Vishnu Ks
52d2d6c4fa
Replace prospero@zulip.com with example_email('prospero').
2017-05-24 19:37:36 -07:00
Vishnu Ks
c4db3b7d1c
Replace cordelia@zulip.com with example_email('cordelia').
2017-05-24 19:37:36 -07:00
Vishnu Ks
961b35d52e
Replace iago@zulip.com with example_email('iago').
2017-05-24 19:37:36 -07:00
Vishnu Ks
5230eaef1c
Replace hamlet@zulip.com with example_email('hamlet').
2017-05-24 19:37:36 -07:00
Vishnu Ks
b65f692fcf
Make LoginEmailValidatorTestCase use ZulipTestCase instead of TestCase.
2017-05-24 19:23:48 -07:00
umkay
c1a8fb615c
mypy: Fix strict-optional errors in webhooks directory.
2017-05-24 18:57:06 -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
Eeshan Garg
b5d271456a
webhooks/trello: Use parametric Markdown macros.
2017-05-24 17:00:19 -07:00
Eeshan Garg
e9b3b56105
webhooks/appfollow: Use parametric Markdown macros.
2017-05-24 17:00:19 -07:00
Eeshan Garg
c433a7981a
webhooks/airbrake: Use parametric Markdown macros for documentation.
2017-05-24 17:00:19 -07:00
Eeshan Garg
3cb758d339
templates: Support parametric Markdown macros for webhooks docs.
2017-05-24 17:00:19 -07:00
Tim Abbott
e9968a7a09
change_user_email: Use new get_user_for_mgmt function.
2017-05-24 15:29:59 -07:00
Vishnu Ks
17b1a8b260
Add get_user_for_mgmt function.
2017-05-24 15:27:48 -07:00
Tim Abbott
6aaca44e17
tests: Fix str/Text mypy issues in various tests.
2017-05-24 15:19:38 -07:00
Andrew Archer
6c3f89af1c
tests: Remove get_user_profile_by_email from numerous tests.
2017-05-24 15:19:20 -07:00
Rick Chern
e53d1c3885
tests: Remove get_user_profile_by_email from most tests.
2017-05-24 13:05:19 -07:00
Vishnu Ks
4403d179df
tests: Replace mit_user().email with mit_email().
2017-05-24 12:44:43 -07:00
Tim Abbott
e5f5e5c69f
tests: Remove unnecessary maxDiff settings.
...
Now that ZulipTestCase does this, we don't need it in all these
individual test modules.
2017-05-24 12:43:28 -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
Tim Abbott
17328a7557
tests: Fix incorrect use of get_realm_by_email_domain.
2017-05-24 12:43:28 -07:00
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
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
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