#NEWLINE# def test_unique_users( self ) : #NEWLINE# #INDENT# '\n        there should not be two users with the same user_type and user_id\n        ' #NEWLINE# for ( auth_system , auth_system_module ) in AUTH_SYSTEMS . iteritems ( ) : #NEWLINE# #INDENT# models . User . objects . create ( user_type = auth_system , user_id = 'foobar' , info = { #NEWLINE# #INDENT# 'name' : 'Foo Bar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# def double_insert( ) : #NEWLINE# #INDENT# models . User . objects . create ( user_type = auth_system , user_id = 'foobar' , info = { #NEWLINE# #INDENT# 'name' : 'Foo2 Bar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# self . assertRaises ( IntegrityError , double_insert ) #NEWLINE# transaction . rollback ( )