def test_run_tools(self, tool_stub): stub = Mock() subject = Processor(None, 1, '123abc', './tests') subject._changes = Mock() subject.run_tools(stub) assert tool_stub.run.called, 'Should have ran' assert subject._changes.get_files.called, 'Should have been called' assert stub.ignore_patterns.called
def test_run_tools(self, tool_stub): gh = self.get_mock_client(load_fixture('commits.json')) stub_config = Mock() subject = Processor(gh, 1, '123abc', './tests') subject._changes = Mock() subject.run_tools(stub_config) assert tool_stub.run.called, 'Should have ran' assert subject._changes.get_files.called, 'Should have been called' assert stub_config.ignore_patterns.called
def test_run_tools(self, tool_stub): pull = self.get_pull_request(load_fixture('commits.json')) repo = Mock() stub_config = Mock() subject = Processor(repo, pull, './tests') subject._changes = Mock() subject.run_tools(stub_config) assert tool_stub.run.called, 'Should have ran' assert subject._changes.get_files.called, 'Should have been called' assert stub_config.ignore_patterns.called
def test_run_tools(self, tool_stub, http): response = Response() response._content = load_fixture('commits.json') http.return_value = response stub = Mock() subject = Processor(http, 1, '123abc', './tests') subject._changes = Mock() subject.run_tools(stub) assert tool_stub.run.called, 'Should have ran' assert subject._changes.get_files.called, 'Should have been called' assert stub.ignore_patterns.called