Anders Kaseorg
bc69f213a0
requirements: Upgrade Python requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
60eed65832
scim: Placate mypy 0.930.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
c8dd90f32b
bot_config: Placate mypy 0.930.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
575932f4e0
actions: Placate mypy 0.930.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
95cddff39b
test_scim: Placate mypy 0.930.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
f45b245f74
test_urls: Fix get_callback_string logic.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
48190cf744
test_timezone: Fix ambiguous_abbrevs type.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
c4c28e06d9
test_openapi: Replace convert_regex_to_url_pattern.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
e3a8f992d5
test_openapi: Fix __wrapped__ accesses.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
d40f3d54f1
test_console_output: Implement the entire TextIO contract.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
702ce071f4
python: Accept Optional[FrameType] in signal handlers.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-28 09:31:55 -08:00
Anders Kaseorg
591bd3f4a1
webhooks: Rename Yo App to Yo.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
1d3520db12
webhooks: Remove space from UptimeRobot.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
68c99511a2
webhooks: Fix TeamCity capitalization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
65868b09eb
webhooks: Add missing space in Review Board.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
c02c053ec3
webhooks: Fix Mailchimp capitalization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
dc72f79a83
webhooks: Fix Canarytokens pluralization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
cd8a01587b
webhooks: Fix Jotform capitalization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Anders Kaseorg
3ca2f8ca1e
webhooks: Fix Clubhouse capitalization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-22 14:05:17 -08:00
Shlok Patel
b1436aed9c
production: Create stream in an atomic transaction.
...
To avoid the window between stream creation and creation of the
Recipient object, we create the stream in an atomic transaction.
Fixes #20127
2021-12-21 15:45:45 -08:00
Anders Kaseorg
dc18aadeb2
test_classes: Type kwargs for client_get and friends.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-17 08:03:52 -08:00
Anders Kaseorg
27977eddeb
export: Use tar -C to switch directories.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-17 08:01:53 -08:00
Anders Kaseorg
6855df0abb
export_single_user: Fix usage with relative --output directory.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-17 08:01:53 -08:00
Anders Kaseorg
0daf32310e
export_single_user: Refuse to overwrite a nonempty directory.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-12-17 08:01:53 -08:00
Steve Howell
3138f7a73c
mypy: Fix content types.
...
This got by mypy due to Message being an Any type.
2021-12-16 20:35:56 -05:00
Steve Howell
0b0faa46b4
mypy: Use object type for checker return values.
2021-12-16 19:52:35 -05:00
Tim Abbott
e152f255f5
test_upload: Remove GIF file extension test.
...
This change should have been in the previous commit.
2021-12-16 16:16:34 -08:00
Tim Abbott
22b5e105e6
upload: Remove incorrect animated GIF asserts.
...
GIF files can be `.GIF`, and also we determine the file format by
inspecting the image data, so there's no reason to have this
assertion.
(The code for serving still images does not rely on the file being a
GIF.)
2021-12-16 16:13:00 -08:00
Sahil Batra
1b23cbdf3e
do_change_user_role: Use transaction.atomic.
2021-12-16 14:24:30 -08:00
Sahil Batra
168f241ff0
do_create_user: Use transaction.atomic.
...
Have kept process_new_human_user out of
the atomic block because it involves many
different operations and also sends events.
Tried enclosing event in on_commit but that
would need many changes in the tests, so have
skipped it for now.
2021-12-16 14:24:30 -08:00
Lauryn Menard
9321095406
tests: Update event tests for `do_update_message` action.
...
Updates testing helpers in `event_schema.py` for `do_update_message` so
that all stream message fields are present in any edits / updates to
stream messages. Adds verfication tests of events returned from private
message edits and from stream message content-only and topic-only edits.
2021-12-16 11:01:31 -08:00
Lauryn Menard
3b72da8a7c
api: Include `stream_id` field for all edits to stream messages.
...
Updates the `update_message` event type to always include a `stream_id`
field when the message being edited is a stream message. This change
aligns with the current definition of the `\get-events` endpoint
in the OpenAPI documentation.
2021-12-16 11:01:31 -08:00
Tim Abbott
ed01e16f60
send_custom_email: Fix dry run with --remote-servers.
2021-12-14 23:19:00 -08:00
Tim Abbott
af27675857
send_custom_email: Add support for emailing remote server contacts.
...
This isn't a fully reusable tool, since it has copy about terms of
service, but it's at least readily modified and has tests.
2021-12-14 18:11:23 -08:00
Tim Abbott
f287606198
send_custom_email: Make options a mandatory kwarg.
2021-12-14 18:11:23 -08:00
Alex Vandiver
4b1fd209be
send_email: Don't abort on an EmailNotDeliveredException.
...
It is better to press on, than stop halfway through due to a user
whose email no longer works. The exception is already logged, which
is sufficient here, as this is generally run interactively.
2021-12-14 17:07:34 -08:00
Alex Vandiver
45736aea3c
email: Don't send overly-long "To" addresses.
...
This parallels b7fa41601d
, but with "To"
addresses, not "From" addresses.
2021-12-14 15:37:12 -08:00
Alex Vandiver
c55c46706d
tests: Fold two tests into TestSendEmail.
...
These fundamentally tested send_email, not build_email, and thus
belong in TestSendEmail, not TestBuildEmail. They also duplicated the
code in test_send_email_exceptions; reuse it.
2021-12-14 15:37:12 -08:00
Alex Vandiver
bfd7254f17
tests: Rename build-email test, expand it for expected behavior.
...
The key to test is that it flips to the shorter form when it would
get too long.
2021-12-14 15:37:12 -08:00
Alex Vandiver
e43373cc1f
video_calls: Drop VIDEO_ZOOM_TESTING_ configurations.
...
These are no longer needed.
2021-12-13 15:17:34 -08:00
Alex Vandiver
5ccbd0eade
ifttt: Ensure topic and body are strings, and not dicts / arrays.
2021-12-13 14:59:00 -08:00
Steve Howell
16db496871
export tests: Verify files for single-user exports.
2021-12-13 12:29:19 -08:00
Steve Howell
3c63ebde15
export tests: Extract ExportFile class.
...
This is just moving code around.
2021-12-13 12:29:19 -08:00
Steve Howell
eb0114cdee
export tests: Add verify_attachment_json.
...
This allows verify_uploads to use the database
as the authoritative source for what attachments
we need to look for when we're verifying the
images got exported properly, while still
also verifying attachment.json is correct.
2021-12-13 12:29:19 -08:00
Steve Howell
24009cb7d3
export tests: Clean up emoji setup.
...
We can't use the normal RealmEmoji from the
test database.
Also, we now use an actual action function to
set up emojis for our own purposes.
2021-12-13 12:29:17 -08:00
Steve Howell
c6cdf98b66
export tests: Rename method to export_realm.
2021-12-13 12:25:19 -08:00
Steve Howell
c79c95d55e
export tests: Split function for uploading files.
...
This will give us flexibility for the single-user
tests.
2021-12-13 12:25:19 -08:00
Steve Howell
a215a14c00
export tests: Use verify_uploads() for s3, too.
2021-12-13 12:25:19 -08:00
Steve Howell
3f5c15320b
export tests: Extract verify_uploads.
2021-12-13 12:25:19 -08:00
Steve Howell
6b5a90bbd1
tests: Extract verify_emojis.
2021-12-13 12:25:19 -08:00