Umair Khan
519dcdb750
api_dev_fetch_api_key: Improve invalid email message.
...
Show a user friendly message to the user if email is invalid.
Currently we show a generic message:
"Your username or password is incorrect."
2017-04-13 12:48:13 -07:00
Umair Khan
80b019629c
remote_user_sso: Improve invalid email message.
...
Show a user friendly message to the user if email is invalid.
Currently we show a generic message:
"Your username or password is incorrect."
2017-04-13 12:48:13 -07:00
Umair Khan
93aa478efb
api_fetch_api_key: Improve invalid email message.
...
Show a user friendly message to the user if email is invalid.
Currently we show a generic message:
"Your username or password is incorrect."
The only backend which can accept a non-email username is LDAP.
So we check if it is enabled before showing the custom message.
2017-04-13 12:48:13 -07:00
Umair Khan
ad2114a7a8
validator.py: Create a validator for login email.
...
This validator raises JsonableError exception.
Fixes : #2748
2017-04-13 12:48:13 -07:00
Tim Abbott
b6da9e86d4
test_templates: Fix ToS/Privacy templates.
2017-04-12 14:40:45 -07:00
K.Kanakhin
4891a8d850
Add default response for `terms` and `privacy` endpoints.
...
- Add setting for `privacy policy` template defining.
- Configure default templates for `privacy policy` and
`terms of service` pages.
- Add route for privacy page.
- Remove condition for showing `privacy` and `terms` pages.
- Add `privacy_policy` setting to context processor.
- Add documentaion part for `privacy` and `terms` templates
configuration.
- Add tests.
Fixes #3686 .
2017-04-12 14:09:14 -07:00
Tim Abbott
4d42b910cb
tests: Refactor test_events for realm properties.
...
This removes individual tests for realm properties and replaces them
with a generic do_set_realm_property_test function to test each
property in the Realm.property_types attribute.
Addresses part of #3854 .
2017-04-12 13:33:10 -07:00
Sarah
bf4d33793f
tests: Refactor test_realm to fix code duplication.
...
This replaces individual tests for realm properties with a generic
do_test_realm_update_api function to test each property in the
Realm.property_types attribute.
Addresses part of #3854 .
2017-04-12 13:26:53 -07:00
rahuldeve
60803137f2
uploads: Add authorization check before serving files.
...
This is a remerge of e985b57259
(after
resolving merge conflicts, updating the tests, adding mypy annotations
etc.), which should now be correct, because we've done the necessary
database migration.
The rebase/remerge work was done by Tim Abbott and Aditya Bansal.
This is an important part of #320 .
2017-04-07 16:35:28 -07:00
Umair Khan
a45f8b463a
app_filters.py: Use Django to load template.
...
This commit allows us to load template using Django in
render_markdown_path.
2017-04-07 15:52:15 -07:00
Tim Abbott
d540b2834d
test_events: Fix errors with Python 2.
2017-04-06 19:26:42 -07:00
Tim Abbott
06a814f6d5
actions: Deduplicate backend display_settings code.
2017-04-06 15:33:41 -07:00
Tomasz Kolek
5b17622589
docs: Move integrations.html to integrations/index.html.
...
Add omiting rule for all of integrations docs in test_templates.
2017-04-05 13:19:58 -07:00
Tim Abbott
cfe8871dfc
test_audit_log: Put all tests in a single test class.
...
This simplifies the process for adding new tests here a bit.
2017-04-05 12:53:59 -07:00
Maxim Averin
02900ff54a
Switch do_change_bot_owner to use RealmAuditLog.
...
This requires adding an `acting_user` parameter to the
`do_change_bot_owner` function.
2017-04-05 12:50:55 -07:00
Umair Khan
be65125d3d
Handle unicode characters in email mirror.
...
Fixes #2328 .
2017-04-05 12:18:41 -07:00
Umair Khan
8e87ba439d
github: Go to registration if email is invalid.
2017-04-04 18:03:33 -07:00
Umair Khan
3bac73159a
backends: Test authenticate() with kwargs.
...
Django uses arguments to differentiate between different authenticate
function so it is important to pass arguments in a predictable manner.
Keyword args will test the name of the argument as well.
2017-04-04 18:03:33 -07:00
Umair Khan
8c3a0126c1
test_auth_backends.py: Add get_username().
2017-04-04 18:03:33 -07:00
Umair Khan
24dfc49792
test_users: Change assert_max_length to assert_length.
2017-04-04 17:07:34 -07:00
Umair Khan
5682b208ea
test_signup: Change assert_max_length to assert_length.
2017-04-04 17:07:34 -07:00
Umair Khan
1b8d9f186e
test_presence: Change assert_max_length to assert_length.
2017-04-04 17:07:34 -07:00
Umair Khan
cc96cefe75
test_messages: Change assert_max_length to assert_length.
2017-04-04 17:07:06 -07:00
Steve Howell
205f2c1562
Add ping_only flag for presence updates.
...
The web app doesn't need any presence data for its first ping to
the server, because it already has up-to-date presence info in
page_params. So now we can tell the server not to send us a big
payload that we were already ignoring.
2017-04-04 15:57:10 -07:00
Steve Howell
3a332aee0b
Exclude dormant users from buddy list queries.
...
If a user has not shown activity in two weeks, we exclude
them from the buddy list. This should help performance for
large realms and mobile clients.
2017-04-04 15:57:10 -07:00
Harshit Bansal
cebcfb8d29
test_realm_aliases.py: `realm_alias` to `realm_domain` migration.
...
* Remove any occurrences of `alias` or `realm_alias`.
* Rename `test_realm_aliases.py` to `test_realm_domains.py`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
fe4cba9aa7
test_events.py: Remove any remaining occurrences of `alias`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
711a3f8037
actions.py: Rename remaining occurrences of `alias' to `realm_domain`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
c226c651f7
actions.py: Rename `do_remove_realm_alias()` to `do_remove_realm_domain()`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
a08155b09e
actions.py: Rename `do_change_realm_alias()` to `do_change_realm_domain()`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
2da4fc0dc4
actions.py: Rename `do_add_realm_alias()` to `do_add_realm_domain()`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
ac2172e233
models: Rename RealmAlias model to RealmDomain.
...
Includes a migration.
2017-04-04 15:48:03 -07:00
Umair Khan
4f9b6303a7
test_narrow.py: Add workaround for Pgroonga regression.
...
Due to Pgroonga regression, there is a difference in search
result between Travis and development env due to which one of
our tests fails. This commit makes sure that the test passes
for both strings till the Pgroonga bug is resolved.
2017-03-29 22:12:15 -07:00
Sarah
dea563b27e
zerver/lib/test_events: Refactor realm update tests.
...
Created do_set_realm_property_test and refactored individual realm tests
to use this function for testing updating realm properties.
2017-03-30 02:17:10 +00:00
Tim Abbott
9aa77e491e
tests: Get hotspots to 100% test coverage.
2017-03-29 14:04:33 -07:00
Amy Liu
6f061beb46
hotspots: Add backend support for tutorial hotspots.
...
This commit adds the backend support for a new style of tutorial which
allows for highlighting of multiple areas of the page with hotspots that
disappear when clicked by the user.
2017-03-29 11:34:32 -07:00
Umair Khan
33c130a603
Make pgroonga tests pass to workaround pgroonga regression.
...
Note that the old behavior was correct; we're just merging this to
make the tests pass until upstream can fix it.
2017-03-29 11:32:37 -07:00
Tim Abbott
9a9f0f86e9
test_messages: Fix sometimes incomplete coverage in StarTests.
...
This test had nondeterministically incomplete test coverage.
2017-03-28 11:41:45 -07:00
Tim Abbott
5776ecfac2
test_audit_log: Fix unnecessary user creation.
2017-03-27 13:23:10 -07:00
Maxim Averin
f213369e1d
zerver: Replace log_event with RealmAuditLog in do_change_avatar_fields.
2017-03-27 13:23:10 -07:00
Tim Abbott
db92dec05e
test_events: Start using test_dict_only.
...
This is a proof of concept; we'll want to migrate the rest of the call
points soon.
2017-03-26 13:10:54 -07:00
Tim Abbott
2160088d94
test_events: Enforce length of events list.
2017-03-26 13:10:54 -07:00
Tim Abbott
118f2db22d
validators: Add a test_dict_only validator that bans other arguments.
...
This is primarily intended to be useful in EventsRegisterTest.
2017-03-26 13:10:54 -07:00
Tim Abbott
36bb2bf54a
AdminZulipHandler: Bring logging_handlers.py to 100% test coverage.
...
This involved fixing some unupdated code in one code path.
2017-03-26 13:10:43 -07:00
Tim Abbott
267346f5fb
AdminZulipHandler: Support passing a record without a request.
2017-03-26 13:10:43 -07:00
Tim Abbott
1a17b11788
logging_handlers: Add tests for main error reporting code path.
2017-03-26 13:10:43 -07:00
Rishi Gupta
30024d0a8f
models: Remove Realm.domain.
2017-03-25 19:55:48 -07:00
Rishi Gupta
b416587aab
Change sender_domain to sender_realm_str in message dict.
2017-03-25 19:50:24 -07:00
Harshit Bansal
11327fda7c
actions.py: Only admins and bot's owner should recieve bot related events.
...
Modify `bot_owner_user_ids()` to return the user_ids of only
admins and bot owners instead of all the current active users.
This was causing a traceback on the frontend.
Fixes : #3391 .
2017-03-25 18:22:15 -07:00
Elliott Jin
98ddb4453e
test-backend: Raise zerver/views/home.py test coverage to 100%.
2017-03-25 18:16:16 -07:00