#NEWLINE# def test_yaml_files_with_backends_yaml( self ) : #NEWLINE# #INDENT# os . path . isdir ( '/appdir/app.yaml' ) . AndReturn ( False ) #NEWLINE# server_config = ServerConfigurationStub ( ) #NEWLINE# application_configuration . ServerConfiguration ( '/appdir/app.yaml' ) . AndReturn ( server_config ) #NEWLINE# os . path . isdir ( '/appdir/backends.yaml' ) . AndReturn ( False ) #NEWLINE# backend_config = ServerConfigurationStub ( server_name = 'backend' ) #NEWLINE# backends_config = self . mox . CreateMock ( application_configuration . BackendsConfiguration ) #NEWLINE# backends_config . get_backend_configurations ( ) . AndReturn ( [ backend_config ] ) #NEWLINE# application_configuration . BackendsConfiguration ( '/appdir/app.yaml' , '/appdir/backends.yaml' ) . AndReturn ( backends_config ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# config = application_configuration . ApplicationConfiguration ( [ '/appdir/app.yaml' , '/appdir/backends.yaml' ] ) #NEWLINE# self . mox . VerifyAll ( ) #NEWLINE# self . assertEqual ( 'myapp' , config . app_id ) #NEWLINE# self . assertSequenceEqual ( [ server_config , config ] , config . servers )