Skip to content

Commit

Permalink
Do not use a context manager with assertRaises
Browse files Browse the repository at this point in the history
This is for python2.6 compatibility.
  • Loading branch information
Alex Schworer committed Jul 3, 2013
1 parent 3857ef2 commit 313e8fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_zencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ def test_set_base_url(self):

def test_set_base_url_and_version_fails(self):
os.environ['ZENCODER_API_KEY'] = 'abcd123'
with self.assertRaises(zencoder.core.ZencoderError):
zc = Zencoder(base_url='https://localhost:800/foo/', api_version='v3')

self.assertRaises(zencoder.core.ZencoderError,
Zencoder,
base_url='https://localhost:800/foo/',
api_version='v3')

def test_set_timeout(self):
api_key = 'testapikey'
Expand Down

0 comments on commit 313e8fe

Please sign in to comment.