<s> """<STR_LIT>""" <EOL> import SoftLayer <EOL> from SoftLayer import fixtures <EOL> from SoftLayer import testing <EOL> class TicketTests ( testing . TestCase ) : <EOL> def set_up ( self ) : <EOL> self . ticket = SoftLayer . TicketManager ( self . client ) <EOL> def test_list_tickets ( self ) : <EOL> results = self . ticket . list_tickets ( ) <EOL> for result in results : <EOL> self . assertIn ( result [ '<STR_LIT:id>' ] , [ <NUM_LIT:100> , <NUM_LIT> , <NUM_LIT> ] ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_list_tickets_all ( self ) : <EOL> results = self . ticket . list_tickets ( open_status = True , <EOL> closed_status = True ) <EOL> for result in results : <EOL> self . assertIn ( result [ '<STR_LIT:id>' ] , [ <NUM_LIT:100> , <NUM_LIT> , <NUM_LIT> ] ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_list_tickets_open ( self ) : <EOL> results = self . ticket . list_tickets ( open_status = True , <EOL> closed_status = False ) <EOL> for result in results : <EOL> self . assertIn ( result [ '<STR_LIT:id>' ] , [ <NUM_LIT> ] ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_list_tickets_closed ( self ) : <EOL> results = self . ticket . list_tickets ( open_status = False , <EOL> closed_status = True ) <EOL> for result in results : <EOL> self . assertIn ( result [ '<STR_LIT:id>' ] , [ <NUM_LIT:100> , <NUM_LIT> ] ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def test_list_subjects ( self ) : <EOL> list_expected_ids = [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ] <EOL> results = self . ticket . list_subjects ( ) <EOL> for result in results : <EOL> self . assertIn ( result [ '<STR_LIT:id>' ] , list_expected_ids ) <EOL> def test_get_instance ( self ) : <EOL> result = self . ticket . get_ticket ( <NUM_LIT:100> ) <EOL> self . assertEqual ( result , fixtures . SoftLayer_Ticket . getObject ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> identifier = <NUM_LIT:100> ) <EOL> def test_create_ticket ( self ) : <EOL> self . ticket . create_ticket ( <EOL> title = "<STR_LIT>" , <EOL> body = "<STR_LIT:body>" , <EOL> subject = <NUM_LIT> ) <EOL> args = ( { "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : "<STR_LIT:body>" , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT:title>" : "<STR_LIT>" } , <EOL> "<STR_LIT:body>" ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> args = args ) <EOL> def test_update_ticket ( self ) : <EOL> self . ticket . update_ticket ( <NUM_LIT:100> , body = '<STR_LIT>' ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> args = ( { '<STR_LIT>' : '<STR_LIT>' } , ) , <EOL> identifier = <NUM_LIT:100> ) <EOL> def test_attach_hardware ( self ) : <EOL> self . ticket . attach_hardware ( <NUM_LIT:100> , <NUM_LIT> ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> args = ( <NUM_LIT> , ) , <EOL> identifier = <NUM_LIT:100> ) <EOL> def test_attach_virtual_server ( self ) : <EOL> self . ticket . attach_virtual_server ( <NUM_LIT:100> , <NUM_LIT> ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> args = ( <NUM_LIT> , ) , <EOL> identifier = <NUM_LIT:100> ) <EOL> def test_detach_hardware ( self ) : <EOL> self . ticket . detach_hardware ( <NUM_LIT:100> , <NUM_LIT> ) <EOL> self . assert_called_with ( '<STR_LIT>' , '<STR_LIT>' , <EOL> args = ( <NUM_LIT> , ) , <EOL> identifier = <NUM_LIT:100> ) <EOL> def test_detach_virtual_server ( self ) : <EOL> self . ticket . detach_virtual_server ( <NUM_LIT:100> , <NUM_LIT> ) <EOL> self . assert_called_with ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> args = ( <NUM_LIT> , ) , <EOL> identifier = <NUM_LIT:100> ) </s>
