Commit Graph

1919 Commits

Author SHA1 Message Date
Rishi Gupta
b335ad2794 models: Add MIN_INTERVAL_LENGTH to UserActivityInterval.
Was previously a floating magic number appearing in both
zerver/lib/actions.py and analytics/lib/counts.py.
2017-04-18 11:02:51 -07:00
Umair Khan
ea0288c4d0 testing: Create DB only in init_worker for parallel mode.
This commit has no bearing on serial mode performance. For parallel
mode, this will reduce the overhead of one instance of DB
destruction/creation.
2017-04-18 09:10:38 -07:00
Umair Khan
740a6c8081 test_runner.py: Add a docstring to init_worker(). 2017-04-18 09:08:17 -07:00
Sampriti Panda
0e3d694df8 bugdown: Use queue for processing of links in image previews.
Earlier, a stack was being used to go through the message and search
for links.  Because of this, in some cases the images were added to
the preview in reverse.  Using a queue will keep the image previews in
the same order as they appeared in the message.

Fixes #4453.
2017-04-17 20:48:16 -07:00
hackerkid
c4f0fa97a8 Replace timezone.make_aware with timezone_make_aware. 2017-04-16 12:28:56 -07:00
hackerkid
6ddee006bd Replace timezone.is_naive with timezone_is_naive. 2017-04-16 12:28:56 -07:00
hackerkid
b2504084ab Replace timezone.now with timezone_now. 2017-04-16 12:28:56 -07:00
hackerkid
55c3d12078 Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
Rishi Gupta
2f74ccabf9 analytics: Add 15day_actives CountStat. 2017-04-14 11:41:07 -07:00
hackerkid
bf3b2ac673 Include timezone in user_dict fields.
Tweaked by tabbott to avoid adding timezone to bot dicts, since bots
don't need a timezone.
2017-04-14 10:33:55 -07:00
Tim Abbott
622b7f00f7 test_runner: Fix unnecessary sleep(1) in database teardown.
Apparently, Django's _destroy_test_db has a mostly unnecessary
sleep(1) before dropping the database, which obviously wastes a bunch
of time in the single-test runtime of their database teardown logic.

We work around this by monkey-patching that function to not do the sleep.
2017-04-14 09:30:47 -07:00
Umair Khan
a507a47778 testing: Use zulip_test_template for backend.
Instead of zulip_test, use zulip_test_template for backend DB. This
makes sure that the DB used by backend tests is different from the
DB, which will be zulip_test, used by Casper tests.
2017-04-14 10:23:31 +05: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
1747427bf3 upload: Fix URL for realm icons with S3 backend. 2017-04-12 19:48:24 -07:00
K.Kanakhin
3d4020fd1c tests: Add AssertNotIn helper to the base test class. 2017-04-12 14:09:14 -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
Umair Khan
c9140dfa4c testing: Use a random database name when running backend tests.
This decreases risk of conflicts between running the backend and
casper test suites.

Part of #1977.
2017-04-12 13:17:40 -07:00
Umair Khan
65b96aab0c testing: Extract functions to create/destroy test databases. 2017-04-12 13:17:32 -07:00
Adarsh S
d54dea819d Add option for re-running failed tests.
This adds the option '--rerun' to the `test-backend` infrastructure.
It runs the tests that failed during the last 'test-backend' run.  It
works by stailing failed test info at var/last_test_failure.json

Cleaned up by Umair Khan and Tim Abbott.
2017-04-12 11:35:31 -07:00
hollywoodno
401fae30f1 markdown: Render backend second level markdown.
By default, Python markdown tab length for indents is 4 spaces, which
require using 4 spaces or a tab to create nested elements. This
modifies that setting to specify 2-space indentation for nesting
elements only.

Modified significantly by tabbott to limit the change to just list
indentation.

Fixes #4252.
2017-04-07 16:14:57 -07:00
Umair Khan
21c129c93b integrations: Support writing docs in markdown.
Fixes #4011
2017-04-07 15:52:15 -07:00
Umair Khan
db81cd1c41 integrations: Create help_content property.
This property handles the rendering of help content.
2017-04-07 15:52:15 -07:00
Umair Khan
21f5c5cbf4 integrations: Pass context to integration objects. 2017-04-07 15:52:15 -07:00
Tim Abbott
06a814f6d5 actions: Deduplicate backend display_settings code. 2017-04-06 15:33:41 -07:00
Tim Abbott
b9c6c22b60 actions: Remove some unnecessary log_event calls.
Users editing messages or updating message flags are either already
recorded or not interesting from an audit perspective, and so there's
no need to use log_event with them.
2017-04-06 14:20:04 -07:00
Tim Abbott
6d27dcc801 actions: Remove log_message helper.
Since we are likely to never use the old populate_db history replay
logic, there's no point in having this extra code around.
2017-04-06 14:19:42 -07:00
Tomasz Kolek
a8633e0975 integrations doc: Move twitter doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
1b6cdb92b7 integrations doc: Move trello-plugin doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
85940aef7f integrations doc: Move trac doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
d8ed13740d integrations doc: Move subversion doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
68ca7e7fc5 integrations doc: Move rss doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
65dfc97fc4 integrations doc: Move redmine doc to separate file. 2017-04-05 13:43:48 -07:00
Tomasz Kolek
06e4adc01d integrations doc: Move puppet doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
f4bd9dfda5 integrations doc: Move phabricator doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
4a6acc4fb9 integrations doc: Move perforce doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
5426725c43 integrations doc: Move openshift doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
484fef059b integrations doc: Move nagios doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
489a7d1784 integrations doc: Move mercurial doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
372c7224f0 integrations doc: Move jira-plugin doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
f0ace02e6c integrations doc: Move jenkins doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
34500f755c integrations doc: Move hubot doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
bd1103373d integrations doc: Move google-calendar doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
6ff130b829 integrations doc: Move git doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
d1b4a4546d integrations doc: Move email doc to separate file. 2017-04-05 13:43:47 -07:00
Tomasz Kolek
3c0287cfc7 integrations doc: Move codebase doc to separate file. 2017-04-05 13:37:37 -07:00
Tomasz Kolek
cbe00e020c integrations doc: Move capistrano doc to separate file. 2017-04-05 13:37:37 -07:00
Tomasz Kolek
a39c55b4ab integrations doc: Move asana doc to separate file. 2017-04-05 13:19:58 -07:00
Tomasz Kolek
62603940a7 integrations doc: Remove basecamp old-style doc. 2017-04-05 13:19:58 -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
Cynthia Lin
59bfd4e1c7 integrations: Update logos.
Fixes #3219
2017-04-05 11:45:51 -07:00