Commit Graph

275 Commits

Author SHA1 Message Date
Steve Howell 67058cc26f Enable back door for clearing user's rate-limit history.
(This is helpful to make the tests run faster.)

(imported from commit 48c1beaed8cca76976bd6f54224c33460b55ceac)
2013-06-25 08:46:02 -04:00
Tim Abbott 222ef672b5 [manual] Use ujson instead of simplejson.
This saves something like 15ms on our 1000 message get_old_messages
queries, and will save even more when we start sending JSON dumps into
our memcached system.

We need to install python-ujson on servers and dev instances before
pushing this to prod.

(imported from commit 373690b7c056d00d2299a7588a33f025104bfbca)
2013-06-24 10:17:10 -04:00
Kevin Mehall 4f5b4fdb67 Bugdown: Elipsis followed by TLD should not be linkified. Trac #1388.
(imported from commit 3929e4bc68872e5f5ed58f35dd1b4eb53a2e5990)
2013-06-21 15:33:17 -04:00
Steve Howell 2ee31f46cb Enforce timely tests more aggressively.
(imported from commit b14e484bd72f0fa19b246efeec64815633217a2f)
2013-06-20 16:52:16 -04:00
Steve Howell 92539daa99 Enforce timely test completion.
(imported from commit f2e3ff32b7372cc916cc60ba04abcb90c39197e2)
2013-06-20 16:52:16 -04:00
Steve Howell fac3b756b7 Add decorator to annotate slow Python tests.
(imported from commit adab5330e7f14f38da6755648ae7741fde48d852)
2013-06-20 16:52:16 -04:00
Steve Howell ca144b5297 Eliminate MyResult class by calling test method directly.
Instead of calling test(result), we emulate the behavior of
calling SimpleTestCase.__call__, minus the results protocol.

(imported from commit e12e3d5caa8726c050a2a7cfa583ca4d571d6cbb)
2013-06-20 13:42:32 -04:00
Steve Howell 1e48388728 removed obsolete comment
(imported from commit e04378869834189c26579727fb7727e63e2e1b5d)
2013-06-20 13:13:39 -04:00
Steve Howell 0e40dc9fc6 Print "Running <test>" from within run_test(), not MyResult.
(imported from commit c8e150c5bd56eabd60c167c207655efc2059d6af)
2013-06-20 13:13:39 -04:00
Steve Howell 618ec40ef7 Import time module at top of tests.py
(imported from commit daf6d20f0c452a51b0485c7dca01d1e541661fd5)
2013-06-20 13:13:39 -04:00
Steve Howell cdc095c3b3 Extract run_test() method in back end tests.
(imported from commit 264bf689b282fccf8b4e423060fe0c4d2708b934)
2013-06-20 13:13:39 -04:00
Steve Howell c5631eb489 Make test_emoji about 500ms faster.
The test_emoji test makes sure that we build the correct image
tag for all of our emojis.  It's the same underlying algorithm
for all 800+ images, so we now test it in O(1) times instead
of O(N) time.  Randomly sampling the emojis makes the tests
slightly non-determinisitic in a theoretical sense, but not in
a practical sense.

(imported from commit c78b50072953f2c081fca0272b9ecf762a4802db)
2013-06-20 10:24:40 -04:00
Steve Howell 07afbabb79 Double speed of Python tests by removing fixtures code.
(We don't need the fixtures code once we override Django's
run_suite() method not to clobber our test database, since
all our tests use the same data anyway, and since Django
runs all the tests in a transaction and rolls back their
changes.)

(imported from commit d9daf09be3967de2de30934173b882d3d6b9ea27)
2013-06-20 09:41:34 -04:00
Steve Howell 3c79f6fa53 Make RateLimitTests less brittle to speedy tests
(imported from commit 1b81356d90bdb19b0550363aebb2f1426d386d10)
2013-06-20 09:41:25 -04:00
Steve Howell 712dce8a97 Do not have Django wipe out our test database during Python tests.
In tools/test-backend, we build the test database before calling
"manage.py test, so there is no reason for Django to wipe it
clean.

(imported from commit 7b09e9cc1a9259900ec1cc4f9ebbcacab1efb265)
2013-06-20 09:41:25 -04:00
Steve Howell ad03644371 Add help message for method-missing scenario in tests.
(We now have a full replacement for TestResult, but we don't
support the full API of TestResult.  If folks were to add new
tests that caused TestCase to call our class with an unsupported
method, this diff will provide hopefully a more clear error
message.)

(imported from commit 92033b12a1a901bd649ecb03e08779aa76bfef7a)
2013-06-20 09:38:53 -04:00
Steve Howell f2f9fb7c3b Simplify run_suite for Python tests so we can debug tests more easily.
We use a simplified version of run_suite in our subclass of
DjangoTestSuiteRunner so that we can have more control over failing
fast and indicating progress.  This change also speeds up the tests
by taking roughly 200 lines unittest/Django code out of the picture.
(We basically reinvent a simpler TextTestRunner and TextTestResult.)

(imported from commit 5216b6b582b071bd7c9e923c9886c3bc61faf581)
2013-06-20 09:37:00 -04:00
Steve Howell 25c9f5bace Subsume Django method into our codebase for code review clarity.
(This commit will probably be squashed, but it makes the subsequent
diffs more clear with respect to how we remove functionality from
run_tests.)

(imported from commit 9d0edcd5282a0f90ebd38e0ac229ef874dc00504)
2013-06-20 09:36:49 -04:00
Steve Howell 00a2b23843 Sort the import statements in tests.py (cosmetic).
(imported from commit d730d73841818f7104522b126e7faf1735c897fd)
2013-06-20 09:36:49 -04:00
Kevin Mehall 334424ae79 bugdown: TLD and parentheses shouldn't make it a link. Trac #1364
(imported from commit d4da7ec080a6a8362b6370ced9ddc10d52443452)
2013-06-17 10:08:13 -04:00
Leo Franchi 625f8427e6 Return both subscribed and unsubscribed stream information when listing streams
(imported from commit 0aee84712eefd93aebc1041b371e471182eb7e9b)
2013-06-13 10:06:34 -04:00
Steve Howell d740d7c082 Show user-uploaded avatars on the website.
Show user-uploaded avatars on the website for users who have
UserProfile.avatar_source == 'U'.  (Continue to show gravatars
for other users.)  This includes the home page, the visible-phone
div, and the settings page.

This fix does NOT address a few things:
* There is no GUI to actually upload user images yet on the website.
* The !gravatar syntax in bugdown will continue to show gravatar images
  only.
* We are not changing identicon behavior.

(imported from commit 9f5ac0bbe21ba56528048233aab2430e4dd431aa)
2013-06-12 15:34:51 -04:00
Tim Abbott 0ad1094e45 bugdown: Add custom per-realm filters to linkify certain strings.
I've tried to do this in a way that's scalable and easily configured,
so that we can add new such filters for customers on-demand without
needing to add anything other than a bit of configuration.

Once we're confident in the arguments to this system, I think we'll
want to move the regular expression lists into the database so that we
don't need to do a prod push to modify the regular expression lists.

The initial set of regular expressions are:
(1) Linkifying e.g. "trac #224" in the Humbug realm, so we're exercising this code.
(2) The various ticket number things CUSTOMER7 uses for the CUSTOMER7 realm.

(imported from commit 992b0937b9012c15a7c2f585eb0aacb221c52e01)
2013-06-05 17:48:21 -04:00
Tim Abbott ceacf6f97e tests: Don't call bugdown.convert() directly.
(imported from commit 495e8a050d8bb69e33ae7c0da06ffbec96e11c31)
2013-06-05 17:48:21 -04:00
Leo Franchi 0b5b1dafc4 Add a rate limiting system to our backend
(imported from commit a1218618918b4dedc77307e2f277665e7dd8fa22)
2013-06-04 09:43:09 -04:00
Tim Abbott 2b1799b71c bugdown: Fix handling of twitter-format links that aren't actually tweets.
(imported from commit 60512147d8d303ff07cf1e86306fd14b1490e708)
2013-05-30 10:29:41 -04:00
Tim Abbott abd9e4e635 Use proper randomization when generating new API keys.
Previously we were generating API keys deterministically using a hash
of the user's email address; this is clearly not a good long-term
approach.

(imported from commit 14d0c7c9edbc45b3ae1d17a43765ad9726338d4d)
2013-05-29 15:11:24 -04:00
Tim Abbott 1bfa3d4505 tests: Fix assumption that hamlet was subscribed to stream Scotland.
This would cause annoying issues where occasionally after you
regenerated the database, GetOldMessagesTest might fail.

(imported from commit dc0fc46e3c6ce4c865ca4886823a22bda1a4eff4)
2013-05-28 11:50:56 -04:00
Leo Franchi 4fc7c7c797 Support JIRA workflow post-function web hooks
(imported from commit cf70730f4c5a847835f07f0048559269f3afd06e)
2013-05-24 21:23:56 -04:00
Leo Franchi 9bfec549af Don't use meetup.com in our linkify tests as that triggers Embedly
(imported from commit ea1c33d9ca36cfe78319470f4407ba8faff6b397)
2013-05-22 18:10:02 -04:00
acrefoot 94c61f5507 [manual] Humbug testing databases now backed by postgres
Currently our test database is backed by sqlite; this commit moves
us to using postgres for our all database needs. This, in conjunction
with the patched django on github, allow us to have fewer hacks and
more true-to-life tests. It also sets the stage for testing the bulk_create
and schema search_path patches made to django.

Developers will need to run:
./tools/postgres-init-test-db
./tools/do-destroy-rebuild-test-database

this is assuming that they have already run:
./tools/postgres-init-db
./tools/do-destroy-rebuild-database

at some point on this pg_cluster. (The ordering is important; it will other-
wise complain about the south_migration table).

(imported from commit c56c6f27e13df7ae10b2e643e65d669dde61af3d)
2013-05-20 23:55:03 -04:00
Leo Franchi cf3f62185c Handle unknown JIRA event types
(imported from commit 3760002996bac0a4c2b7b4cc8bff2026fb11978a)
2013-05-20 23:37:57 -04:00
Waseem Daher 47ac589f87 Make inline previews smaller.
(imported from commit 228f6f6f296877810824f98ea8001e47cf955cf1)
2013-05-09 10:44:08 -04:00
Luke Faraone fac83ed2b7 [manual] Add support for Embedly Extract
For sites that are supported, we now grab thumbnails for images + video
embed code for videos and use them in lieu of our existing embed code.

We also embed rich non-script content.

Special casing is done so that we don't embed images twice.

Some testcases were modified to avoid triggering Embed.ly

The manual step is to install python-embedly.

(imported from commit d725bab91675c61953116c5ca741055fce49724e)
2013-05-09 10:42:49 -04:00
Leo Franchi 23847545eb Update settings backend tests to handle new frontent config options
(imported from commit a17f931d51e11edec978c249ae116c734fb8d267)
2013-05-09 10:35:48 -04:00
Jeff Arnold 105fdc076b Reserve height=100 for images so that collapsing takes them into account
Addresses #1204

(imported from commit 9a1f4b13ab14c4b8fc4eab50178b9c28f477fcd7)
2013-05-02 18:53:34 -04:00
Steve Howell be1e18f864 Support branches whitelist for github
(imported from commit 066bb8ee028778cb39b43afc9737fd2117c91928)
2013-05-01 17:19:53 -04:00
Steve Howell b645c67994 Use stream from github webhook call (if supplied).
(imported from commit 4f57c4dec8ab5e833583a2b5912a92e8a2bd34c0)
2013-05-01 17:19:53 -04:00
Steve Howell fbad47ec28 api_key is url parm for jira webhook
(imported from commit 24624a9fcd7e6fdc15d23c2874a04e1465c3f3cf)
2013-04-30 18:14:11 -04:00
Steve Howell 23f0d0bcb7 support stream parameter for jira to override default stream
(imported from commit b3be7b837f326968f9742c25ba04bdaaf6476b75)
2013-04-30 13:24:47 -04:00
Luke Faraone 71a91197fa Enable absolute imports.
See PEP 328[1] for details. This feature was introduced in Python 2.5 and
will become mandatory in Python 3.

[1]: http://www.python.org/dev/peps/pep-0328

(imported from commit 7444eeba8a08d5f91b94c7921848f2274979bd76)
2013-04-23 09:51:17 -07:00
Leo Franchi d34bdedcdb Add tests for pivotal tracker integration
(imported from commit 3d3cff2eed91029ebacc5a0be284572db1a01135)
2013-04-19 13:46:41 -04:00
Tim Abbott 5ab44f6993 Add note to invite notification on historical messages.
(imported from commit ea3da4bd5b3e461b37b1d5af685d96bf5ecdb847)
2013-04-12 15:43:42 -04:00
Zev Benjamin f6a6a6b220 Add per-stream desktop notifications
(imported from commit b4a0576847b3aec1495f017ca9805febe80c9275)
2013-04-10 16:11:27 -04:00
Zev Benjamin 7e532a02ad Simplify subscription property views
This also changes the API for GET /json/subscriptions/property to
only retrieve the property for a particular stream instead of
returning all streams and their properties.  We weren't using this
functionality anywhere and the change makes the API more consistent.

(imported from commit 2799aec2550fd0558e2282beb19734d60801bdb8)
2013-04-10 16:11:27 -04:00
Zev Benjamin a2010871e3 Make subscription properties less free-form
(imported from commit eda607c2abfa51d2dadddc7b9ecba3e2d0b5be4d)
2013-04-10 16:11:27 -04:00
Leo Franchi a9151e4bc3 Handle populate_db generating read messages
NOTE: If you are getting test failures, please run generate-fixtures --force.

(imported from commit 7b44b40e3955742edf337335deb0d92829c7e2e1)
2013-04-09 11:56:32 -04:00
Luke Faraone 28afd7126f Send test uploads to their own bucket.
(imported from commit b47628c410b7732b2b58af42b40369e01da8a250)
2013-04-05 13:07:18 -07:00
Luke Faraone f20f605376 [manual] Add file upload support.
This allows users to drag and drop content onto the compose box, storing
their data in Amazon S3.

New dependencies:
 - python-boto

(imported from commit 339874e483db5c36312c9ceae56db29da6ca0d99)
2013-04-05 13:07:13 -07:00
Keegan McAllister 36a4e587ec Fix a markup test for Python-Markdown 2.3
Apparently it no longer coalesces adjacent blank lines in a code block (which
seems like an improvement).  The new test case doesn't have adjacent blank
lines and will work on old and new versions alike (tested on staging).

(imported from commit e49902be041cf1e7d6fbe489685b966cf4eae108)
2013-04-05 13:14:00 -04:00
Leo Franchi aef86a8d45 Use form POST data for beanstalk and add shim for incorrectly-encoded emails
(imported from commit b5debaa02a6a23c01aee1b2beb6fd83e70e50d65)
2013-04-03 10:21:06 -04:00
Leo Franchi 0055107cfd Use IANA's TLD list for auto-linkification detecting
(imported from commit 9103fdc92405b92300a793bd1d4f493df64b5b9c)
2013-04-03 09:58:17 -04:00
Leo Franchi a5643efa14 Allow @ in urls
(imported from commit cb2ffe4a8f050e732bb06ab4609997be35577417)
2013-04-02 18:38:38 -04:00
Leo Franchi d127d6f19f Support up to one level deep of nested parens in urls
(imported from commit 3f314b16a47b5267ddb0d18aa6c5456656895f77)
2013-04-02 18:38:38 -04:00
Keegan McAllister 191231ab3d bugdown: Whitelist URL schemes
(imported from commit 76e22cec3918c00faaa903baae74915cc5e64264)
2013-04-02 18:38:38 -04:00
Keegan McAllister 5d538d7a2a bugdown: Allow colons in URLs
(imported from commit b57fc21f4508f2bff3cbc32a6359de686aa3a96e)
2013-04-02 18:38:38 -04:00
Leo Franchi 1c4ca370f2 Add a test for our github service hooks
(imported from commit 400f1ca1e2eb16b0f496cb7f5598613e19ed3a83)
2013-04-02 13:43:13 -04:00
Leo Franchi a406aeadc8 Add beanstalk integration along with tests
Beanstalk integration uses webhooks that use http basic auth to authenticate
the sending user.

(imported from commit bd65f5b2d052a3c1eb04da64d055a3640a384892)
2013-04-02 13:35:42 -04:00
Tim Abbott 1cec86eb2d [manual] Remove now-unused User model.
I think all that one needs to do to deploy this commit is on developer
laptops, run `generate-fixtures --force`.

(imported from commit 34916341435fef0875b5a2c7f53c2f5606cd16cd)
2013-04-02 12:57:10 -04:00
Tim Abbott 5dbe8b4c17 [manual] Authenticate using a user_profile as request.user.
When this is deployed to staging, we need to run

./manage.py logout_all_users --realm=humbughq.com

When this is deployed to prod, we need to run

./manage.py logout_all_users

(imported from commit d6c6ea4b1c347f3d9122742db23c7b67767a7349)
2013-04-02 12:07:08 -04:00
Tim Abbott 1443edce00 Access the UserProfile's new email field rather than using User.
This is preparatory for stopping using the User model.

(imported from commit a1b0808c8cc2ddd19a25163f91c4f18620c9ce90)
2013-04-02 12:07:08 -04:00
Tim Abbott dc5839f66d tests: Fix User/UserProfile confusion in filter_by_subscriptions path.
Our testing code had a number of places where it was using User
objects where it should have been using UserProfile objects --
e.g. using a User id as the type_id in a Recipient table.  This commit
addresses this in the filter_by_subscriptions code paths.

(imported from commit e305bc8e2a8bdbfd04c93c59d56955e7971552af)
2013-03-29 16:18:38 -04:00
Tim Abbott 198480ef99 Use get_user_profile_by_email more consistently.
The previous situation was bad for two reasons:

(1) It had a lot of copies of the code, some of them missing pieces:
  UserProfile.objects.get(user__email__iexact=foo)

This was in particular going to be inconvenient since we are dropping
the __user part of that.

(2) It didn't take advantage of our memcached caching.

(imported from commit 2325795f288a7cf306cdae191f5d3080aac0651a)
2013-03-29 16:18:38 -04:00
Leo Franchi e546161e8d Handle web hooks from JIRA for integration support
(imported from commit d4db0b850becf42dee6f0a9df7b19c692fef41f1)
2013-03-29 16:14:39 -04:00
Jessica McKellar f28fe19fa8 tests: add a comment that the pygments import is still necessary.
(imported from commit c17dfc9e3b8ecf207b4cb7f4d33443122b747905)
2013-03-28 16:59:59 -04:00
Jessica McKellar f050f28e05 tests: add backend tests for starring messages.
(imported from commit 5b315ad06888c60523afb666dae95287609ffa52)
2013-03-28 16:59:59 -04:00
Luke Faraone 7eee9d4905 Implement generic REQ class which pulls from request.REQUEST.
This is to allow flexibility in functions that we think should be callable
via either GET or POST.

As part of this, POSTRequestMock was extended to populate the REQUEST
dict.

(imported from commit b9d32d2b65ff8a25885452992cf7dd37b9664246)
2013-03-28 07:53:39 -07:00
Luke Faraone 60075e596f stream_exists_backend now returns a 404 if the stream is not found.
Update tests and compose.js to handle the 404.

(imported from commit d9ba4fe59c34bd14d9198e3365a845888fa04f03)
2013-03-28 07:53:37 -07:00
Jessica McKellar cc8ee68514 tests: assert that text objects are instances of basestring, since they might be str or unicode.
This fixes tests that have been failing for me for, well, months, that
I've been ignoring:

======================================================================
FAIL: test_successful_subscriptions_list (zephyr.tests.SubscriptionAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jesstess/dev/humbug/zephyr/tests.py", line 631, in test_successful_subscriptions_list
    self.assertIsInstance(stream['name'], str)
AssertionError: u'Denmark' is not an instance of <type 'str'>

======================================================================
FAIL: test_get_stream_colors (zephyr.tests.SubscriptionPropertiesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/jesstess/dev/humbug/zephyr/tests.py", line 515, in test_get_stream_colors
    self.assertIsInstance(color,  str)
AssertionError: u'#c2c2c2' is not an instance of <type 'str'>

----------------------------------------------------------------------

The more comprehensive fix to this is going through both our API and
JSON calls and ensuring that we always return unicode objects,
documenting that, and then testing that more specifically. For now, at
least have passing tests.

(imported from commit ed1875ea1f66c1f1e89f80502c0d6abb323dc489)
2013-03-23 00:19:38 -04:00
Jessica McKellar 55240e3de2 tests: test inviting someone to a non-ASCII stream.
(imported from commit d1788cf4712800c1b3445ad47510ac488e7935b0)
2013-03-23 00:10:10 -04:00
Jessica McKellar c4ceb2c276 tests: test inviting a new user with non-ASCII streams.
(imported from commit 049ae5a77c87eaaf0313b4b83d1dd038b14dcc22)
2013-03-23 00:10:09 -04:00
Jessica McKellar 9b89d7dc19 tests: add tests for sending non-ASCII messages.
(imported from commit 16093b2a080e7b00149129a9b53f308d8688def2)
2013-03-23 00:10:09 -04:00
Jessica McKellar 531ad235df tests: exercise non-ASCII login information.
(imported from commit 51a79a637a2d624c78627c84cd93d10cd700dff5)
2013-03-23 00:10:09 -04:00
Leo Franchi 4a23959b11 Remove pointer_updater param as it is no longer used
(imported from commit 80cc4a6d4c24660087981b1132ca2ed44c86a424)
2013-03-14 13:35:28 -04:00
Waseem Daher 9c45b96b21 Make Dropbox inline image preview more robust to sharing links.
Sometimes Dropbox shares with /s/ and sometimes with /sh/,
and I'm not sure which controls it, but we should deal with both.

(imported from commit 2222450f25c418b5fbd60ab2c30477467e34c0d1)
2013-03-13 17:46:43 -04:00
Leo Franchi 93a3f14c43 Add backend support for handling new 'read' message flag
(imported from commit 6194e9332caa2d279cbc304f0d6a69f969aa9a72)
2013-03-13 14:14:45 -04:00
Leo Franchi 9466addbe2 Allow negative anchor param to get_old_message
When narrowing, we use the selected id in the home view as the anchor,
and if the user is new and hasn't selected any messages yet (or moved
the pointer since first using humbug), their home view selected message
will be -1. Rather than failing to get_old_messages for any narrows starting
from that point, return all matching messages.

(imported from commit 72cfe392d9ac01ed41abc8eadf0f47240e374665)
2013-03-11 15:11:24 -04:00
Waseem Daher 29d504149c twitter: Only render the first Twitter link we see, not all of them.
(imported from commit 68582224962da14795d91a68197db1001ae7b75c)
2013-03-08 17:45:58 -05:00
Waseem Daher 1df648baa9 Add inline preview of Twitter links.
This uses the unauthed v1 of the Twitter API, which is going to go
away soon, but it's fine as an interim measure.

(imported from commit 709a250271321f5479854a363875c9da43e6382d)
2013-03-08 14:31:18 -05:00
Waseem Daher 0dee6235cc Don't image-ify :( and other smileys 😞
(imported from commit 25323f19572c24da36267064a1ca820d80c9db79)
2013-03-05 16:22:51 -05:00
Waseem Daher 9f0877a7f2 Add emoji support 👍 🎩 💩 😀
(imported from commit 5f15ddb4492aad7cc4a9b3249acac8b8edc0a177)
2013-03-04 11:08:00 -05:00
Waseem Daher 1650dba322 Intelligently preview Dropbox image links.
Even though they look like images, they're not -- you need to
append ?dl=1 to get the image version.

(imported from commit 2a05e7c58f475c908687110d9191f8709425c660)
2013-03-04 10:38:42 -05:00
Tim Abbott 02bf89c3c3 Add inline previews for images and youtube videos.
(imported from commit 13711a7821318c8bff7c483e874756a63d761c15)
2013-03-01 14:21:35 -05:00
Tim Abbott 1e9a85ff05 Fix use of case-sensitive comparisons on email addresses.
(imported from commit d420169640a9f9c034b3d9ded207e583691f6652)
2013-02-28 17:49:57 -05:00
Tim Abbott 49af19aa71 Add support for narrowing by a message's sender.
Fixes #972.

(imported from commit 2514d14c94a071f2b3e6149a2bdaeaa00e0c847f)
2013-02-28 17:49:57 -05:00
Keegan McAllister 29b98e5546 Display invalid links as plain text rather than linkifying with empty href
Fixes #1001.

(imported from commit 116df72f37e45dd87c34cd836918dd559630fe76)
2013-02-27 11:29:05 -05:00
Leo Franchi 86fbdfe183 Add test for ** not matching over newlines
(imported from commit 08556ab9f5a5b9455c4e31dded089776ded9d708)
2013-02-14 11:56:53 -05:00
Keegan McAllister 3d69db8469 tests: Fail with a useful error message if Pygments is missing
(imported from commit 9c0eba6b5629a28c6171ec316038120acaa3ea44)
2013-02-12 15:04:30 -05:00
Leo Franchi 3fe5ffe293 Add active test for MIT being empty and fix same_realm test
(imported from commit 8f67e594fabc9fe1b1d1356f94f046e7cb562c6a)
2013-02-12 13:57:10 -05:00
Leo Franchi 7ab82019eb Add more url linkify tests
(imported from commit 34e22ede44e8089cc551b1b7350fdf85b3a80cf0)
2013-02-12 12:24:15 -05:00
Leo Franchi 674118c104 Add unit tests for active/idle presence
(imported from commit 2685b4ed052b32f347d9d879392b7e87c3e89e1a)
2013-02-11 18:05:57 -05:00
Jessica McKellar b99670777a tests: check actual e-mail results in invite tests.
(imported from commit 45debbc00024de66aecd6cef17946868819f9566)
2013-02-08 13:20:19 -05:00
Jessica McKellar 8d528f9441 tests: add tests for inviting existing users and users outside your domain.
(imported from commit c96e548fa934ba51e1549970c3700b6f26304fb4)
2013-02-08 13:20:19 -05:00
Jessica McKellar b35a529ef3 tests: update invite tests to reflect text changes.
(imported from commit a3d0d0068a0b51cdf7840891e6b5a17cc0c083d2)
2013-02-08 13:20:18 -05:00
Jessica McKellar 256fa0e485 Fix invite bug in which we'd falsely say you'd invited folks with existing accounts.
(imported from commit 9114836d084937dcc1a707338dd916e28f97a87d)
2013-02-08 13:20:18 -05:00
Leo Franchi c637b9cf44 Handle chars at end of link better
(imported from commit 53842bc17bbb9cfb555738ee6b72291d7ce61d67)
2013-02-06 11:51:52 -05:00
Waseem Daher 99edd920c5 tests: Make sure that our subscriptions list properly returns the invite-only bit.
(imported from commit c060c6b350d335d5e94c07314fcfe7c766f2efcd)
2013-02-05 17:24:29 -05:00
Waseem Daher af45236968 tests: Cause existing tests to pass after change to gather_subscriptions.
(imported from commit 3524a5d69d9228810ae863fdea9a9f007a1ca7db)
2013-02-05 17:24:29 -05:00
Luke Faraone ac0dbd0864 Return in_home_view in gather_subscriptions.
This enables us to do client-side filtering on messages by the value of
this setting.

(imported from commit e69a7772dc90c67cb91ea8f630f5b78c902e8fa8)
2013-02-05 15:34:37 -05:00
Luke Faraone e8afaa8b8e Return a dictionary in subscriptions/list instead of a tuple.
This will give us flexibility in the future to add new properties to the
list.

In order to support that, we now do a list comprehension rather than just
returning the gather_subscriptions list in get_stream_colors.

(imported from commit a3c0f749a3320f647440f800105942434da08111)
2013-02-05 15:34:37 -05:00