#NEWLINE# @ pytest . mark . django_db #NEWLINE# def test_search_operator_and( client , admin_user , live_server , repository , rpc_endpoint ) : #NEWLINE# #INDENT# ReleaseFactory ( package__name = 'my-package-1' , package__repository = repository , summary = 'Test summary' ) #NEWLINE# ReleaseFactory ( package__name = 'arcoiro' , package__repository = repository , summary = 'Test summary' ) #NEWLINE# ReleaseFactory ( package__name = 'my-package-2' , package__repository = repository , summary = 'arcoiro' ) #NEWLINE# client = xmlrpclib . ServerProxy ( ( live_server + rpc_endpoint ) ) #NEWLINE# response = client . search ( { #NEWLINE# #INDENT# 'name' : [ 'my-package' ] , #NEWLINE# 'summary' : [ 'Test summary' ] , #NEWLINE# #UNINDENT# } , 'and' ) #NEWLINE# assert ( response == [ { #NEWLINE# #INDENT# '_pypi_ordering' : 0 , #NEWLINE# 'name' : 'my-package-1' , #NEWLINE# 'summary' : 'Test summary' , #NEWLINE# 'version' : '1.0.0' , #NEWLINE# #UNINDENT# } ] )