Eklavya Sharma
fb1d00fc6c
Upgrade python-twitter to latest version.
...
Fixes #1145 .
2016-07-17 10:23:25 -07:00
Eklavya Sharma
4130170da8
bugdown: Fix string handling.
...
Use unicode strings where needed and correctly encode/decode strings.
2016-07-17 10:23:25 -07:00
Eklavya Sharma
abe7faa2f9
bugdown: Annotate some variables.
2016-07-17 10:23:25 -07:00
Steve Howell
60bd20da61
Remove zerver/lib/query.py (dead code).
2016-07-16 14:51:15 -07:00
Rishi Gupta
09754c9861
Remove JsonableErrors from actions.do_update_message.
...
There were a bunch of authorization and well-formedness checks in
zerver.lib.actions.do_update_message that I moved to
zerver.views.messages.update_message_backend.
Reason: by convention, functions in actions.py complete their actions;
error checking should be done outside the file when possible.
Fixes : #1150 .
2016-07-15 13:55:49 -07:00
Rishi Gupta
d529a94e4d
Add realm setting to time-limit editing of message content.
...
This is controlled through the admin tab and a new field in the Realms table.
Notes:
* The admin tab setting takes a value in minutes, whereas the backend stores it
in seconds.
* This setting is unused when allow_message_editing is false.
* There is some generosity in how the limit is enforced. For instance, if the
user sees the hovering edit button, we ensure they have at least 5 seconds to
click it, and if the user gets to the message edit form, we ensure they have
at least 10 seconds to make the edit, by relaxing the limit.
* This commit also includes a countdown timer in the message edit form.
Resolves #903 .
2016-07-15 13:55:49 -07:00
Alex Gaynor
a8a2e13096
Upgrade to the latest cryptography.
2016-07-15 12:25:48 -07:00
Rishi Gupta
d34000b211
prod install docs: Make minor fixes and edits.
2016-07-15 11:19:58 -07:00
Eklavya Sharma
29673411df
Make backend tests (hackishly) pass on python3.4.
...
Replace bot_owner=bot_owner by bot_owner_id=bot_owner.id while
creating a UserProfile object.
2016-07-15 11:13:33 -07:00
Eklavya Sharma
8c0d7311ac
zerver/decorator.py: Use BytesIO to read request.
...
Use BytesIO instead of StringIO to get a file-like object on the
request's body.
2016-07-15 11:13:33 -07:00
Umair Khan
8dabc97d9e
Add tests for frontend i18n regexes.
2016-07-15 14:48:09 +05:00
Umair Khan
a07a810a2e
Fix regex for capturing frontned strings.
...
Fixes : #1155
2016-07-15 14:48:05 +05:00
Steve Howell
9d7716f368
Add message.topic_name() helper function.
...
This little helper will facilitate adding a new Topic
table in the future.
2016-07-14 09:54:56 -07:00
Steve Howell
a5b9e3b893
Add test_patch_bot_avatar().
...
Fixes : #1002
2016-07-13 22:53:46 -07:00
Steve Howell
21fb7693d2
Add test_helpers.client_patch_multipart().
2016-07-13 22:53:40 -07:00
Steve Howell
538962f3ca
Add test_add_bot_with_username_in_use().
2016-07-13 22:53:40 -07:00
Steve Howell
468faf5724
Add test_add_bot_with_bad_username().
2016-07-13 22:53:40 -07:00
Steve Howell
de4cc80aa0
Add test_add_bot_with_too_many_files().
2016-07-13 22:53:40 -07:00
Steve Howell
e9ddf28b2c
Add test_add_bot_with_user_avatar().
2016-07-13 22:53:40 -07:00
Preston Hansen
87e485c89f
Add error message when user attempts to submit empty alert word.
...
Resolves #1194 .
2016-07-13 21:07:20 -07:00
Eklavya Sharma
3894ea0e30
Upgrade mypy version.
2016-07-13 21:05:12 -07:00
Tim Abbott
c7819ed177
Fix broken link to old FoundationDB integration.
2016-07-13 21:00:38 -07:00
Tomasz Kolek
f689fbfa4d
Replace old Trello integration with a webhook integration.
...
Fixes : #709 .
[With tweaks on the documentation by tabbott]
2016-07-13 21:00:27 -07:00
Tim Abbott
f8a83fcb11
integrations: Fix top-of-page instructions appearing on every page.
2016-07-13 20:59:38 -07:00
Steve Howell
701bb7a59f
Remove test_helpers.DummySession
2016-07-13 19:08:28 -07:00
Steve Howell
616e49e2e8
Remove test_helpers.DummyTornadoRequest
2016-07-13 19:08:28 -07:00
Steve Howell
0060ea7903
Remove test_helpers.DummyStream
2016-07-13 19:08:28 -07:00
Steve Howell
191ac80475
Remove callback logic from test_helpers.DummyHandler.
2016-07-13 19:08:28 -07:00
Taranjeet Singh
9db457e8fa
provision.py: Create var/coverage directory to store coverage data.
...
test-backend: Update coverage directory to var/coverage.
This commit updates the coverage directory to var/coverage as a part
of Issue 1132.
2016-07-13 18:58:00 -07:00
Tim Abbott
6254e29ebf
update-deployment: Use the virtualenv in deployment process.
2016-07-13 18:56:44 -07:00
Tim Abbott
599f12f94f
update-prod-static: Fix deploy path for language_options.json.
2016-07-13 18:56:37 -07:00
Tim Abbott
baeaf0f870
check-templates: Fix traceback with missing closing tag at end of file.
...
Previously, this would crash with an unclear traceback in this situation.
2016-07-13 18:55:40 -07:00
Eklavya Sharma
d7ea2b8a67
zerver/tests/test_upload.py: Use byte strings.
...
Some string literals are incorrectly marked as `str` strings.
Change them to byte strings.
2016-07-13 16:00:46 -07:00
Eklavya Sharma
a7d2dab28f
Fix non-deterministic output from Taiga integration.
...
Taiga's webhook integration would give output events in a random
order which caused test failures on python 3 (seems like python
3 is more prone to non-deterministic failures). Fix that by
sorting the outputs obtained from events before concatenating them.
2016-07-13 16:00:46 -07:00
Eklavya Sharma
5382aeb385
Render PagerDuty message using ujson.dumps.
...
Use ujson.dumps to render raw messages sent by the PagerDuty
integration instead of using pprint.pformat. pprint.pformat
gives different results on python 2 and 3.
2016-07-13 16:00:46 -07:00
Eklavya Sharma
4f633bcd0b
zerver/lib/notifications.py: Fix string encoding/decoding.
...
Correctly encode and decode strings in convert_html_to_markdown.
It wasn't possible to use universal_newlines=True since
Popen.communicate doesn't encode/decode strings correctly on
python 2.
2016-07-13 16:00:46 -07:00
Eklavya Sharma
e6502710b6
Change exception.message to str(exception).
...
The 'message' attribute in Exception has been deprecated.
It has been removed in python 3.
2016-07-13 16:00:46 -07:00
Eklavya Sharma
993558c680
Get mogrified SQL queries as text.
...
zerver.lib.test_helpers.queries_captured returns a byte string,
while we want the queries to be text. So decode the captured
queries.
2016-07-13 16:00:46 -07:00
Rishi Gupta
94b68baf2f
10-admin.js: Comment out failing casper tests.
...
There is a hard to reproduce race condition causing these tests to
occasionally fail. We believe it is caused by switching to the home tab and
not properly waiting for all the messages to load; see Issue #1243 . The
tests are for the following pathway (not a high priority to test):
1. User starts editing a message.
2. allow_message_editing is turned off for the realm (in this case, by the
user going to the admin page and turning it off).
3. User finishes editing the message and hits send.
2016-07-13 15:59:44 -07:00
Tim Abbott
c0a6672471
Update path to language_options.json in production.
...
The previous code didn't correctly transport language_options.json to
the production environment.
2016-07-13 12:30:45 -07:00
Umair Khan
9f42fda7f4
Use stripped down version of Talon.
2016-07-13 11:24:18 -07:00
Umair Khan
f45848f62f
Install mypy-lang as egg.
...
It seems that --install-option given in any pip requirement
pollutes the pollutes the global space and causes installation
of mypy-lang to give error.
2016-07-13 11:24:18 -07:00
Umair Khan
395e053ce3
Revert "Revert "Extract reply from email.""
...
This reverts commit f1ba3ded42
.
2016-07-13 11:24:18 -07:00
Umair Khan
f15dfc69fb
Make code Python 3 compatible.
...
Make convert_html_to_markdown function Python 3 compatible.
2016-07-13 11:24:18 -07:00
Tim Abbott
34a251adb1
upload: Fix exception uploaded files with unknown content type.
...
It turns out our detected content_type can actually be None, which
meant calling force_text on it broke uploading some files.
2016-07-13 10:57:55 -07:00
Umair Khan
0aae0eab49
Switch to PyAPNS for sending push notifications.
...
Switch to [PyAPNS](https://github.com/djacobs/PyAPNs ).
Fixes #538 .
2016-07-13 10:55:07 -07:00
Umair Khan
636466ff8b
Fix unreliable tests for missed messages.
...
Generate random token using getrandints.
Resolves the proximal issue discussed in #1212 .
2016-07-13 10:51:21 -07:00
Steve Howell
c069c8f1e7
Add test_update_api_key_for_invalid_user().
2016-07-13 07:51:00 -07:00
Steve Howell
aea79517f5
Test bot_owner logic in /json/users
...
This fixes a small gap in our coverage for get_members_backend.
2016-07-12 23:01:56 -07:00
Tim Abbott
af8047967f
Upgrade ujson to latest version (has indent option).
2016-07-12 22:39:06 -07:00