#NEWLINE# @ requires_api_version ( '1.22' ) #NEWLINE# def test_create_with_aliases( self ) : #NEWLINE# #INDENT# ( net_name , net_id ) = self . create_network ( ) #NEWLINE# container = self . client . create_container ( image = 'busybox' , command = 'top' , host_config = self . client . create_host_config ( network_mode = net_name ) , networking_config = self . client . create_networking_config ( { #NEWLINE# #INDENT# net_name : self . client . create_endpoint_config ( aliases = [ 'foo' , 'bar' ] ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . tmp_containers . append ( container ) #NEWLINE# self . client . start ( container ) #NEWLINE# container_data = self . client . inspect_container ( container ) #NEWLINE# self . assertEqual ( container_data [ 'NetworkSettings' ] [ 'Networks' ] [ net_name ] [ 'Aliases' ] , [ 'foo' , 'bar' ] )