#NEWLINE# def test_volumes_from_container( self ) : #NEWLINE# #INDENT# data_container = Container . create ( self . client , image = 'busybox:latest' , volumes = [ '/var/data' ] , name = 'composetest_data_container' , labels = { #NEWLINE# #INDENT# LABEL_PROJECT : 'composetest' , #NEWLINE# #UNINDENT# } ) #NEWLINE# project = Project . from_config ( name = 'composetest' , config_data = build_config ( { #NEWLINE# #INDENT# 'db' : { #NEWLINE# #INDENT# 'image' : 'busybox:latest' , #NEWLINE# 'volumes_from' : [ 'composetest_data_container' ] , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) , client = self . client ) #NEWLINE# db = project . get_service ( 'db' ) #NEWLINE# self . assertEqual ( db . _get_volumes_from ( ) , [ ( db . id + ':rw' ) ] )