diff options
| author | Devendra | 2015-06-19 23:28:23 +0530 |
|---|---|---|
| committer | Devendra | 2015-06-19 23:28:23 +0530 |
| commit | 4c2bb361dcad44226d37cfdb6b8f9d3e2f6789ff (patch) | |
| tree | 5b84abe5a379e32fb625f1aabe48ebab0889134a /python/tests/test_history.py | |
| parent | 276bf54fcccd73cf694487d59e9e3319b8bd8616 (diff) | |
| download | pubnub-python-4c2bb361dcad44226d37cfdb6b8f9d3e2f6789ff.tar.bz2 | |
adding include_token test
Diffstat (limited to 'python/tests/test_history.py')
| -rw-r--r-- | python/tests/test_history.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/python/tests/test_history.py b/python/tests/test_history.py index 1592e11..a5feb37 100644 --- a/python/tests/test_history.py +++ b/python/tests/test_history.py @@ -42,5 +42,17 @@ def test_1(): assert hresp4['message'] == 'Forbidden' assert channel_pam + "no_rw" in hresp4['payload']['channels'] - - +def test_2(): + time.sleep(3) + hresp = pubnub.history(channel=channel, count=20, include_token=True) + hresp2 = pubnub_enc.history(channel=channel_enc, count=20, include_token=True) + hresp3 = pubnub_pam.history(channel=channel_pam, count=20, include_token=True) + hresp4 = pubnub_pam.history(channel=channel_pam + "no_rw", count=20, include_token=True) + assert len(hresp[0]) == len(messages) + assert hresp[0][0]['timetoken'] + assert len(hresp2[0]) == len(messages) + assert hresp2[0][0]['timetoken'] + assert len(hresp3[0]) == len(messages) + assert hresp3[0][0]['timetoken'] + assert hresp4['message'] == 'Forbidden' + assert channel_pam + "no_rw" in hresp4['payload']['channels'] |
