Skip to content

Commit 313e8fe

Browse files
author
Alex Schworer
committed
Do not use a context manager with assertRaises
This is for python2.6 compatibility.
1 parent 3857ef2 commit 313e8fe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test_zencoder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ def test_set_base_url(self):
4242

4343
def test_set_base_url_and_version_fails(self):
4444
os.environ['ZENCODER_API_KEY'] = 'abcd123'
45-
with self.assertRaises(zencoder.core.ZencoderError):
46-
zc = Zencoder(base_url='https://localhost:800/foo/', api_version='v3')
45+
46+
self.assertRaises(zencoder.core.ZencoderError,
47+
Zencoder,
48+
base_url='https://localhost:800/foo/',
49+
api_version='v3')
4750

4851
def test_set_timeout(self):
4952
api_key = 'testapikey'

0 commit comments

Comments
 (0)