#NEWLINE# @ patch ( 'simple_db_migrate.main.Main._execution_log' ) #NEWLINE# @ patch ( 'simple_db_migrate.main.Main._migrate' ) #NEWLINE# def test_it_should_migrate_db_if_create_migration_option_is_not_activated_by_user( self , migrate_mock , _execution_log_mock ) : #NEWLINE# #INDENT# config = Config ( self . initial_config ) #NEWLINE# main = Main ( config = expected_calls , sgdb = Mock ( ) ) #NEWLINE# main . execute ( ) #NEWLINE# expected_calls = [ call ( '\nStarting DB migration on host/database "localhost/test" with user "user"...' , 'PINK' , log_level_limit = 1 ) , call ( '\nDone.\n' , 'PINK' , log_level_limit = 1 ) ] #NEWLINE# self . assertEqual ( expected_calls , _execution_log_mock . mock_calls ) #NEWLINE# self . assertEqual ( 1 , migrate_mock . call_count )