<s> from django_nose . tools import assert_equal <EOL> from mock import patch <EOL> from pontoon . sync . vcs . repositories import VCSRepository <EOL> from pontoon . base . tests import CONTAINS , TestCase <EOL> class VCSRepositoryTests ( TestCase ) : <EOL> def test_execute_log_error ( self ) : <EOL> """<STR_LIT>""" <EOL> repo = VCSRepository ( '<STR_LIT>' ) <EOL> with patch ( '<STR_LIT>' ) as mock_execute , patch ( '<STR_LIT>' ) as mock_log : <EOL> mock_execute . return_value = <NUM_LIT:1> , '<STR_LIT>' , '<STR_LIT>' <EOL> assert_equal ( <EOL> repo . execute ( '<STR_LIT>' , cwd = '<STR_LIT>' , log_errors = True ) , <EOL> ( <NUM_LIT:1> , '<STR_LIT>' , '<STR_LIT>' ) <EOL> ) <EOL> mock_log . error . assert_called_with ( CONTAINS ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) ) </s>
