Commit Graph

17962 Commits

Author SHA1 Message Date
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
Tim Abbott ed82f6f3d0 contrib_bots: Fix lint errors in virtual_fs.py. 2017-05-23 21:35:09 -07:00
neiljp a859dadd29 contrib_bots: Clean up and document virtual_fs bot. 2017-05-23 21:04:34 -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
Abhijeet Kaur aa576d83b0 Refactor: Make StateHandler() function independent.
This refactor makes the nested class 'StateHandler' in the
file /contrib_bots/bot_lib.py independent class. It previously
was nested in 'run_message_handler_for_bot' function.

This is done to write a cleaner test file for contrib_bots using
mock library.
2017-05-23 20:42:09 -07:00
Brian Tenazas 9d485a0415 docs: Document /streams API endpoint. 2017-05-23 20:37:51 -07:00
Yago González 9f329f6597 docs: Fix JsonSuccess and JsonError models. 2017-05-23 20:37:51 -07:00
Mark Shannon c7c47fe11d Replace buggy NotImplemented with NotImplementedError(). 2017-05-23 20:33:35 -07:00
Yago González b668b869c1 docs: Improve /messages/{message_id} PATCH. 2017-05-23 20:32:46 -07:00
Yago González 90301a4d93 docs: Fix indentation in lines started with a hyphen. 2017-05-23 20:30:21 -07:00
Yago González 1fc1cafd6f docs: Make Swagger "require" fields uniform.
As the Swagger specification indicates, whether the properties inside a
model are required or not must be defined inside a separate "required"
field at the root of the model.

For fields like "parameters", that has to be specified inside each
parameter's key.
2017-05-23 20:30:21 -07:00
Yago González fa081146d1 docs: Remove unnecessary "produces" keys. 2017-05-23 20:30:21 -07:00
Yago González 735fc5e0cd docs: Remove unnecessary ErrorModel definition. 2017-05-23 20:30:21 -07:00
Yago González 4bb1c566a9 docs: Remove "optional" notes in descriptions. 2017-05-23 20:30:21 -07:00
Yago González d56ec79dd9 docs: Create JsonSuccess and JsonError definitions. 2017-05-23 20:30:21 -07:00
ron-s e5d4e0f0eb Test: Add test_notify_of_new_user_internally. 2017-05-23 20:27:37 -07:00
Theodore Chen c29e0b4c32 docs: Recommend testing contrib_bots with helloworld bot. 2017-05-23 20:22:40 -07:00
Theodore Chen 42f9cdcc78 bots: Fix googlesearch bot exceptions and add readme. 2017-05-23 20:18:24 -07:00
derAnfaenger 74069561f1 bots: Fix converter bot.
The converter bot depended on past.utils.old_div,
which is not supported anymore. Updating the code
to use the // operator, which provides the same
functionality.
2017-05-23 20:13:29 -07:00
Steve Howell 5003283b64 Enforce 100% test coverage for lib/avatar.py. 2017-05-23 20:07:07 -07:00
Steve Howell c02f4b4756 Add people.initialize().
This makes us not have to stub jquery in many of our node
tests!
2017-05-23 19:35:08 -07:00
Joshua Pan 43487c6c3f node_tests: Get unread.js to 100% node coverage. 2017-05-23 19:04:02 -07:00
Joshua Pan d44626d456 node_tests: Get topic_generator.js to 100% node coverage. 2017-05-23 19:00:56 -07:00
Steve Howell 7c1b555331 node tests: Use zjquery for common.js tests. 2017-05-23 18:52:25 -07:00
Steve Howell 1cb58d72b2 zjquery: Add focus/blur methods. 2017-05-23 18:52:25 -07:00
Steve Howell cd08bbe7d8 zjquery: Add array-like functionality to elements.
(We simulate the behavior that a jquery object looks like an
array, but also has methods that can be called as if it were a
scalar.)
2017-05-23 18:52:25 -07:00
Steve Howell 4c520780a1 zjquery: Support $(func) flavor of $() calls. 2017-05-23 18:52:25 -07:00
neiljp fb9ea6b0d9 contrib_bots: Update xkcd bot to use send_reply.
This enables private message usage.
2017-05-23 18:43:43 -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
neiljp 62ac170880 contrib_bots: Remove triage_message() from help bot.
This completes removing triage_message from the tree.
2017-05-23 18:30:39 -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
Tim Abbott 109c5c677a mypy: Fix return value annotation for google_oauth2_csrf. 2017-05-23 17:47:03 -07:00
Tim Abbott 17f87cfc9e mypy: Fix missing Optional on process_exception. 2017-05-23 17:44:30 -07:00
Tim Abbott 315a9ee72e handlers: Fix type of zulip_finish. 2017-05-23 17:36:19 -07:00
neiljp 8b25766ff2 contrib_bots: Switch encrypt bot to use send_reply. 2017-05-23 17:32:51 -07:00
Tim Abbott 207c30fc9c Revert "settings: Fix missing status report when waiting period disabled."
This reverts commit a25e7451f6.

This changed the wrong if statement in this file.
2017-05-23 17:02:35 -07:00
neiljp d766687632 bots: Switch define bot to use send_reply. 2017-05-23 17:02:03 -07:00
Steve Howell ecdc500440 test-backend: Run only one process for --rerun option. 2017-05-23 16:59:22 -07:00
Sarah 01cb480b2c settings-org.js: Create property_types object and refactor set_up.
Create property_types object for realm settings. In set_up function,
iterate over property_types to find settings that were updated, send those
new values to the server, and report that the changes were made.
2017-05-23 16:32:36 -07:00
Tim Abbott a25e7451f6 settings: Fix missing status report when waiting period disabled.
Previously, if one set the waiting period threshhold to 0, no
notification would be produced, even though the actual state of the
world was changed.
2017-05-23 16:31:41 -07:00
Sarah 4c4444b2dc zerver/lib/actions: Fix PEP8 E712 error. 2017-05-23 16:29:49 -07:00
Tim Abbott 796cf8e5fd mypy: Fix a buggy annotation in create_mirrored_message_users. 2017-05-23 15:45:56 -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 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