Supriya
4959e8d10a
tests: Extract and use assert_max_length test helper.
...
This makes it much more explicit in which cases we're checking
equality or a maximum in our use of `assert_length`.
Fixes #1400 .
2016-09-25 15:44:58 -07:00
Steve Howell
98a500d46f
tests: Add test_stream_message_unicode().
2016-09-24 16:56:34 -07:00
Steve Howell
5486e539fd
tests: Test Message.__unicode__() for PMs.
2016-09-24 16:56:34 -07:00
Steve Howell
2d0d823a59
tests: Add test_fetch_raw_message().
2016-09-19 14:25:21 -07:00
sunnypalace
3b76a489c9
Remove humbug-user-uploads and related code.
...
Fixes : #1672 .
2016-09-19 10:52:05 -07:00
Steve Howell
edf7ea7f51
tests: Add make_client() test helper.
2016-09-13 14:32:59 -07:00
Steve Howell
fd6ee7117f
tests: Renamed AuthedTestCase to ZulipTestCase.
2016-08-22 19:07:44 -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
Steve Howell
9fb071947d
Remove expected_run_time from @slow test decorator.
2016-07-29 16:41:21 -07:00
Steve Howell
38f2a2f475
Add client_post() test helper.
...
This makes us more consistent, since we have other wrappers
like client_patch, client_put, and client_delete.
Wrapping also will facilitate instrumentation of our posting code.
2016-07-27 20:49:32 -07:00
Steve Howell
eb11e02309
Add MirroredMessageUsersTest.
2016-07-26 20:01:36 -07:00
Steve Howell
e341fe0102
Use topic_name() in do_edit_message_assert_error().
2016-07-18 14:10:11 -07:00
Steve Howell
6afa22f473
Add LogDictTest.test_to_log_dict().
2016-07-17 11:25:02 -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
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
Tim Abbott
05632b68e1
edit: Add validation for setting empty content.
2016-07-10 18:01:59 -07:00
Tim Abbott
0d418d5695
Add some message editing tests for invalid input.
2016-07-10 18:01:59 -07:00
Tim Abbott
1e2d38e790
Move stringify_message_dict into to_dict_uncached.
2016-07-08 17:58:56 -07:00
Tim Abbott
a05c03d3b5
test_messages: Fix trying to login as a bot user.
...
Due to a recent refactoring, the first user in the subscribers list is
now a bot.
2016-06-27 11:48:39 -07:00
Tim Abbott
370b38696a
test_messages: Fix broken huddle messages test.
...
The second login call was failing because the user didn't exist.
2016-06-27 11:48:36 -07:00
Tomasz Kolek
7aa45ffa45
Increase send_message_backend coverage.
2016-06-21 14:33:21 -07:00
Tim Abbott
50f723f50b
Split test_narrow.py out of test_messages.py.
2016-06-21 12:25:08 -07:00
Tomasz Kolek
e3e03e2946
Add NarrowBuilder test cases.
...
Refactor existing add_term test cases.
2016-06-21 11:53:31 -07:00
Tim Abbott
3a0eb01dda
test_messages: Fix huddle test failing when not on Internet.
2016-06-03 23:18:39 -07:00
Tomasz Kolek
8c18b8947f
Add bot_type field to UserProfile.
...
This is intended to support creating different types of bots with
potentially limited permissions.
2016-05-19 22:37:37 -07:00
rahuldeve
dde832b158
Add Attachment model to keep track of uploads.
...
This commit adds the capability to keep track and remove uploaded
files. Unclaimed attachments are files that have been uploaded to the
server but are not referred in any messages. A management command to
remove old unclaimed files after a week is also included.
Tests for getting the file referred in messages are also included.
2016-05-02 22:14:47 -07:00
Tomasz Kolek
12fc4f047c
test_helpers: Create get_last_message helper.
2016-04-26 09:54:02 -07:00
Tim Abbott
f6edc21981
Change stream used in test_get_old_messages_with_only_searching_anchor.
...
This prevents this test from breaking when in a few commits we fix a
nondeterminism issue in the populate_db test fixtures.
2016-04-13 13:19:02 -07:00
Tim Abbott
be96cf809d
Move Zulip backend tests to zerver.tests.
2016-04-11 22:16:09 -07:00