Skip to content

Commit

Permalink
Add integration tests for 'revoke' method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Allegre committed Jun 5, 2015
1 parent 920bc26 commit 8080fbc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/integration/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import time
import unittest
import urllib2

# 3p
from nose.plugins.attrib import attr
Expand Down Expand Up @@ -553,6 +554,15 @@ def _compare_screenboard(board1, board2):

share_res = dog.Screenboard.share(get_res['id'])
assert share_res['board_id'] == get_res['id']
public_url = share_res['public_url'].replace('8080', '5000')

response = urllib2.urlopen(public_url)
assert response.code == 200

revoke_res = dog.Screenboard.revoke(get_res['id'])
with self.assertRaises(urllib2.HTTPError) as cm:
urllib2.urlopen(public_url)
assert cm.exception.code == 404

delete_res = dog.Screenboard.delete(update_res['id'])
assert delete_res['id'] == update_res['id']
Expand Down

0 comments on commit 8080fbc

Please sign in to comment.