Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.lister.sourceforge.tests.test_lister::test_sourceforge_lister_retry
Failed

TEST RESULT

Run At
Nov 23 2021, 10:55 AM
Details
swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7f03deb0a898> requests_mock = <requests_mock.mocker.Mocker object at 0x7f03deb0a710> mocker = <pytest_mock.plugin.MockerFixture object at 0x7f03deb0a940> datadir = '/var/lib/jenkins/workspace/DLS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/lister/sourceforge/tests/data' def test_sourceforge_lister_retry(swh_scheduler, requests_mock, mocker, datadir): lister = SourceForgeLister(scheduler=swh_scheduler) # Exponential retries take a long time, so stub time.sleep mocked_sleep = mocker.patch.object(lister.page_request.retry, "sleep") requests_mock.get( MAIN_SITEMAP_URL, [ {"status_code": 429}, {"status_code": 429}, {"text": get_main_sitemap(datadir)}, ], additional_matcher=_check_request_headers, ) requests_mock.get( "https://sourceforge.net/allura_sitemap/sitemap-0.xml", [{"status_code": 429}, {"text": get_subsitemap_0(datadir), "status_code": 301}], additional_matcher=_check_request_headers, ) requests_mock.get( "https://sourceforge.net/allura_sitemap/sitemap-1.xml", [{"status_code": 429}, {"text": get_subsitemap_1(datadir)}], additional_matcher=_check_request_headers, ) requests_mock.get( re.compile("https://sourceforge.net/rest/.*"), [{"status_code": 429}, {"json": functools.partial(get_project_json, datadir)}], additional_matcher=_check_request_headers, ) > stats = lister.run() .tox/py3/lib/python3.7/site-packages/swh/lister/sourceforge/tests/test_lister.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:130: in run full_stats.origins += self.send_origins(origins) .tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:233: in send_origins for batch_origins in grouper(origins, n=1000): .tox/py3/lib/python3.7/site-packages/swh/core/utils.py:47: in grouper for _data in itertools.zip_longest(*args, fillvalue=stop_value): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.lister.sourceforge.lister.SourceForgeLister object at 0x7f03deb0a828> page = [SourceForgeListerEntry(vcs=<VcsNames.GIT: 'git'>, url='https://git.code.sf.net/p/os3dmodels/git', last_modified='2017...terEntry(vcs=<VcsNames.SUBVERSION: 'svn'>, url='https://svn.code.sf.net/p/os3dmodels/svn', last_modified='2017-03-31')] def get_origins_from_page( self, page: SourceForgeListerPage ) -> Iterator[ListedOrigin]: assert self.lister_obj.id is not None for hit in page: last_update = datetime.datetime.combine( > hit.last_modified, datetime.time(tzinfo=datetime.timezone.utc) ) E TypeError: combine() argument 1 must be datetime.date, not str .tox/py3/lib/python3.7/site-packages/swh/lister/sourceforge/lister.py:251: TypeError