#NEWLINE# def test_alphabet( self ) : #NEWLINE# #INDENT# alphabet = '01' #NEWLINE# su1 = ShortUUID ( alphabet ) #NEWLINE# su2 = ShortUUID ( ) #NEWLINE# self . assertEqual ( alphabet , su1 . get_alphabet ( ) ) #NEWLINE# su1 . set_alphabet ( '01010101010101' ) #NEWLINE# self . assertEqual ( alphabet , su1 . get_alphabet ( ) ) #NEWLINE# self . assertEqual ( set ( su1 . uuid ( ) ) , set ( '01' ) ) #NEWLINE# self . assertTrue ( ( 116 < len ( su1 . uuid ( ) ) < 140 ) ) #NEWLINE# self . assertTrue ( ( 20 < len ( su2 . uuid ( ) ) < 24 ) ) #NEWLINE# u = uuid4 ( ) #NEWLINE# self . assertEqual ( u , su1 . decode ( su1 . encode ( u ) ) ) #NEWLINE# u = su1 . uuid ( ) #NEWLINE# self . assertEqual ( u , su1 . encode ( su1 . decode ( u ) ) ) #NEWLINE# self . assertRaises ( ValueError , su1 . set_alphabet , '1' ) #NEWLINE# self . assertRaises ( ValueError , su1 . set_alphabet , '1111111' )