Last active
October 28, 2015 23:30
-
-
Save andrefreitas/307bd0397a3cb13a601e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
py.test | |
======================================================================= test session starts ======================================================================= | |
platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1 | |
rootdir: /code, inifile: setup.cfg | |
plugins: cov-2.2.0 | |
collected 76 items | |
bugimporters/tests/test_bugzilla.py ............. | |
bugimporters/tests/test_github.py .... | |
bugimporters/tests/test_google.py ..F.F.F.F.......... | |
bugimporters/tests/test_jira.py ... | |
bugimporters/tests/test_launchpad.py ..... | |
bugimporters/tests/test_roundup.py ........ | |
bugimporters/tests/test_spider.py . | |
bugimporters/tests/test_tigris.py ...... | |
bugimporters/tests/test_trac.py ................. | |
============================================================================ FAILURES ============================================================================= | |
___________________________________________________________ TestGoogleBugImporter.test_process_queries ____________________________________________________________ | |
self = <bugimporters.tests.test_google.TestGoogleBugImporter object at 0x7fb35613f1d0>, scrapy = <MagicMock name='http' id='140408220023568'> | |
@mock.patch('bugimporters.google.scrapy.http') | |
def test_process_queries(self, scrapy): | |
queries = ['http://example.com'] | |
retval = list(self.importer.process_queries(queries)) | |
expected_call_kwargs = { | |
'url': queries[0], | |
'callback': self.importer.handle_query_csv, | |
} | |
request = retval[0] | |
> request.http.Request.assertCalledWith(**expected_call_kwargs) | |
bugimporters/tests/test_google.py:44: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MagicMock name='http.Request().http.Request' id='140408219737616'>, name = 'assertCalledWith' | |
def __getattr__(self, name): | |
if name in ('_mock_methods', '_mock_unsafe'): | |
raise AttributeError(name) | |
elif self._mock_methods is not None: | |
if name not in self._mock_methods or name in _all_magics: | |
raise AttributeError("Mock object has no attribute %r" % name) | |
elif _is_magic(name): | |
raise AttributeError(name) | |
if not self._mock_unsafe: | |
if name.startswith(('assert', 'assret')): | |
> raise AttributeError(name) | |
E AttributeError: assertCalledWith | |
/root/virtualenv/lib/python2.7/site-packages/mock/mock.py:721: AttributeError | |
_____________________________________________________________ TestGoogleBugImporter.test_process_bugs _____________________________________________________________ | |
self = <bugimporters.tests.test_google.TestGoogleBugImporter object at 0x7fb3560972d0>, scrapy = <MagicMock name='http' id='140408219333968'> | |
@mock.patch('bugimporters.google.scrapy.http') | |
def test_process_bugs(self, scrapy): | |
bug_list = [ | |
('http://code.google.com/p/foo/issues/detail?id=1', {}), | |
] | |
retval = list(self.importer.process_bugs(bug_list)) | |
expected_call_kwargs = { | |
'url': bug_list[0][0], | |
'meta': {'issue': bug_list[0][1]}, | |
'callback': self.importer.handle_bug_html, | |
} | |
request = retval[0] | |
> request.http.Request.assertCalledWith(**expected_call_kwargs) | |
bugimporters/tests/test_google.py:68: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MagicMock name='http.Request().http.Request' id='140408219331536'>, name = 'assertCalledWith' | |
def __getattr__(self, name): | |
if name in ('_mock_methods', '_mock_unsafe'): | |
raise AttributeError(name) | |
elif self._mock_methods is not None: | |
if name not in self._mock_methods or name in _all_magics: | |
raise AttributeError("Mock object has no attribute %r" % name) | |
elif _is_magic(name): | |
raise AttributeError(name) | |
if not self._mock_unsafe: | |
if name.startswith(('assert', 'assret')): | |
> raise AttributeError(name) | |
E AttributeError: assertCalledWith | |
/root/virtualenv/lib/python2.7/site-packages/mock/mock.py:721: AttributeError | |
_______________________________________________ TestGoogleBugImporter.test_create_bug_dict_from_csv_handles_paging ________________________________________________ | |
self = <bugimporters.tests.test_google.TestGoogleBugImporter object at 0x7fb35605bd10>, scrapy = <MagicMock name='http' id='140408219090704'> | |
@mock.patch('bugimporters.google.scrapy.http') | |
def test_create_bug_dict_from_csv_handles_paging(self, scrapy): | |
project = 'myproj' | |
example_line = ("This file is truncated to 100 out of 636 total " | |
"results. See https://example.com/ for the next set " | |
"of results.") | |
csv_data = [{'ID': example_line}] | |
self.importer._create_bug_dict_from_csv(project, csv_data) | |
expected_call_kwargs = { | |
'url': 'http://example.com/', | |
'callback': self.importer.handle_query_csv, | |
} | |
> scrapy.http.Request.assertCalledWith(**expected_call_kwargs) | |
bugimporters/tests/test_google.py:104: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MagicMock name='http.http.Request' id='140408219166288'>, name = 'assertCalledWith' | |
def __getattr__(self, name): | |
if name in ('_mock_methods', '_mock_unsafe'): | |
raise AttributeError(name) | |
elif self._mock_methods is not None: | |
if name not in self._mock_methods or name in _all_magics: | |
raise AttributeError("Mock object has no attribute %r" % name) | |
elif _is_magic(name): | |
raise AttributeError(name) | |
if not self._mock_unsafe: | |
if name.startswith(('assert', 'assret')): | |
> raise AttributeError(name) | |
E AttributeError: assertCalledWith | |
/root/virtualenv/lib/python2.7/site-packages/mock/mock.py:721: AttributeError | |
___________________________________________________________ TestGoogleBugImporter.test_handle_bug_html ____________________________________________________________ | |
self = <bugimporters.tests.test_google.TestGoogleBugImporter object at 0x7fb35607b5d0> | |
def test_handle_bug_html(self): | |
with mock.patch.object(google.GoogleBugParser, 'parse') as parse: | |
self.importer.handle_bug_html(self.response) | |
> parse.assertCalledWith(self.tracker_model) | |
bugimporters/tests/test_google.py:132: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MagicMock name='parse' id='140408219219280'>, name = 'assertCalledWith' | |
def __getattr__(self, name): | |
if name in ('_mock_methods', '_mock_unsafe'): | |
raise AttributeError(name) | |
elif self._mock_methods is not None: | |
if name not in self._mock_methods or name in _all_magics: | |
raise AttributeError("Mock object has no attribute %r" % name) | |
elif _is_magic(name): | |
raise AttributeError(name) | |
if not self._mock_unsafe: | |
if name.startswith(('assert', 'assret')): | |
> raise AttributeError(name) | |
E AttributeError: assertCalledWith | |
/root/virtualenv/lib/python2.7/site-packages/mock/mock.py:721: AttributeError | |
-------------------------------------------------------------- generated xml file: /code/report.xml --------------------------------------------------------------- | |
--------------------------------------------------------- coverage: platform linux2, python 2.7.9-final-0 --------------------------------------------------------- | |
Coverage XML written to file coverage.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment