Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Nov 23 2021, 10:55 AM
Details
swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7f03deda2ba8> requests_mock = <requests_mock.mocker.Mocker object at 0x7f03deda2748> 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_full(swh_scheduler, requests_mock, datadir): """ Simulate a full listing of an artificially restricted sourceforge. There are 5 different projects, spread over two sub-sitemaps, a few of which have multiple VCS listed, one has none, one is outside of the standard `/p/` namespace, some with custom mount points. All non-interesting but related entries have been kept. """ lister = SourceForgeLister(scheduler=swh_scheduler) requests_mock.get( MAIN_SITEMAP_URL, text=get_main_sitemap(datadir), additional_matcher=_check_request_headers, ) requests_mock.get( "https://sourceforge.net/allura_sitemap/sitemap-0.xml", text=get_subsitemap_0(datadir), additional_matcher=_check_request_headers, ) requests_mock.get( "https://sourceforge.net/allura_sitemap/sitemap-1.xml", text=get_subsitemap_1(datadir), additional_matcher=_check_request_headers, ) requests_mock.get( re.compile("https://sourceforge.net/rest/.*"), 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:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .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 0x7f03deda2978> 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