#NEWLINE# def test_sas( self ) : #NEWLINE# #INDENT# container = 'mock-container' #NEWLINE# start = datetime . datetime ( 2015 , 1 , 1 ) #NEWLINE# expiry = datetime . datetime ( 2015 , 12 , 31 ) #NEWLINE# permissions = 'rl' #NEWLINE# parsed = urlparse ( self . container . sas ( container , start , expiry , permissions ) ) #NEWLINE# assert ( parsed . scheme == 'https' ) #NEWLINE# assert ( parsed . netloc == ( MOCK_STORAGE_NAME + '.blob.core.windows.net' ) ) #NEWLINE# assert ( parsed . path == ( '/' + container ) ) #NEWLINE# assert ( 'st=2015-01-01T00%3A00%3A00Z&' in parsed . query ) #NEWLINE# assert ( 'se=2015-12-31T00%3A00%3A00Z' in parsed . query ) #NEWLINE# assert ( 'sp=rl&' in parsed . query ) #NEWLINE# assert ( 'sr=c&' in parsed . query ) #NEWLINE# assert ( 'sig=' in permissions . query )