<s> from __future__ import with_statement <EOL> from smugpy import SmugMug , SmugMugException <EOL> from . import smugpy <EOL> import sys <EOL> import unittest <EOL> API_KEY = "<STR_LIT>" <EOL> OAUTH_SECRET = "<STR_LIT>" <EOL> class TestSetup ( unittest . TestCase ) : <EOL> def test_no_api_key ( self ) : <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> self . assertRaises ( SmugMugException , lambda : SmugMug ( ) ) <EOL> else : <EOL> with self . assertRaises ( SmugMugException ) : <EOL> SmugMug ( ) <EOL> def test_oauth_not_supported ( self ) : <EOL> if sys . version_info < ( <NUM_LIT:2> , <NUM_LIT:7> ) : <EOL> self . assertRaises ( SmugMugException , lambda : SmugMug ( api_key = API_KEY , oauth_secret = OAUTH_SECRET , api_version = "<STR_LIT>" ) ) <EOL> else : <EOL> with self . assertRaises ( SmugMugException ) : <EOL> SmugMug ( api_key = API_KEY , oauth_secret = OAUTH_SECRET , api_version = "<STR_LIT>" ) </s>
