#NEWLINE# def test_is_database_replication_valid_with_db_slave( self ) : #NEWLINE# #INDENT# fake_node = flexmock ( ) #NEWLINE# fake_node . should_receive ( 'is_role' ) . with_args ( 'database' ) . and_return ( False ) #NEWLINE# fake_node . should_receive ( 'is_role' ) . with_args ( 'db_master' ) . and_return ( False ) #NEWLINE# fake_node . should_receive ( 'is_role' ) . with_args ( 'db_slave' ) . and_return ( True ) #NEWLINE# output = NodeLayout ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . is_database_replication_valid ( [ fake_node ] ) #NEWLINE# self . assertTrue ( fake_node [ 'result' ] )