Tomasz Kolek
f2319d1b08
Add unittests for receives_offline_notifications function.
...
Fixes #2645 .
2016-12-14 12:03:12 -08:00
Tomasz Kolek
bec9ce755d
Add unittests for receives_online_notifications function.
...
Fixes : #2645 .
2016-12-14 11:49:59 -08:00
bulat22101
9f68efa47b
mypy: Convert zerver/tests/ to use typing.Text.
2016-12-04 14:47:21 -08:00
Sidhant Bhavnani
8c0c12c1d9
pep8: Fix E303 violations.
2016-12-02 15:34:11 -08:00
Rafid Aslam
41bd88d5ed
pep8: Fix E301 pep8 violations.
...
Fix "E301: expected (1 or 2) blank line" pep8 violations.
2016-11-29 08:51:44 -08:00
sinwar
4582a98c09
tests: Split out ZulipTestCase and WebhookTestCase to a separate file.
...
Fixes #1671 .
2016-11-10 19:29:43 -08:00
Steve Howell
f9cdc63250
tests: Add test_push_api().
...
We now have 100% coverage on views/push_notifications.py, modulo
some dead code which will be addressed in the next commit.
There were some existing tests in text_external.py, but that
module is really intended for tests that hit external services.
The view is a really simple API that updates a DB table, and the
new test code focuses on error handling and idempotency as well
as the happy path.
2016-09-15 06:39:41 -07:00
Umair Khan
593779a3b0
Annotate zerver/tests/test_push_notifications.py.
2016-09-12 08:10:50 -07:00
Umair Khan
86920a297c
Mock out loggers in push notification tests.
...
Fixes : #1575
2016-08-09 22:16:09 +05:00
Umair Khan
7a84f12a38
Verify mock calls without strict order.
...
In push notification tests, call assert_has_calls with `any_order=True`
so that the order of the calls does not matter.
2016-08-09 22:15:37 +05:00
Umair Khan
8c249f859e
Push Notification: Add tests for GCM.
2016-08-09 16:13:02 +05:00
Umair Khan
9c13e9a072
Annotate test_push_notifications.
2016-08-08 15:17:02 -07:00
Umair Khan
503ad774f5
Tokens should be unicode.
2016-08-08 15:17:01 -07:00
Umair Khan
d33fc0046f
Add APNS feedback server tests.
2016-08-05 10:36:57 -07:00
Umair Khan
33450d1a0b
Add APNS push notification tests.
2016-08-05 10:36:57 -07:00
Umair Khan
40054ce26c
Add APNS response listener test case.
2016-08-05 10:36:57 -07:00
Umair Khan
df8fc30b75
Create MockRedis class.
...
Redis is not available on Travis and creating a mock Redis server looks
easier than using `mock` module.
2016-08-05 10:36:57 -07:00
Umair Khan
2ab796aeb5
Add tests for APNS message.
2016-08-05 10:36:57 -07:00