Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.misc.test_badges::Tests / Python tests / test_badge_errors
Failed

TEST RESULT

Run At
May 25 2022, 4:46 PM
Details
client = <django.test.client.Client object at 0x7f45dc3d8f28> unknown_content = {'blake2s256': 'c70e609f4343f14b468df812995118be2bf0498f8735248f08e0722dbd642502', 'sha1': '900e2bbcb8ccc27770d0e01881...dd0222617431b2eb3da0edf142b9736c572f2bd', 'sha256': '4693c2cd8f78426c5fd0b67ec9102530a20919c023638d5204a70b5304c45148'} unknown_directory = 'c9f5492100115ace2fe5e0e6fe5c88fa42c048cb' unknown_release = '8df0a80cfaab15a6b82ee2d782c296ad38aff7f7' unknown_revision = '33a8e02e1f16b09965159aa59de9a7fd9516f422' unknown_snapshot = 'bde4d959585d7d3a260dc12506e3bfd7e647ba02' invalid_sha1 = 'af475f745b97720465413309751d357975e32b93e88578369fd0fbdc61b1361241309eaaf1b666c0fed434e9d31928f0c3d1' @given( > new_origin(), ) def test_badge_errors( client, unknown_content, unknown_directory, unknown_release, unknown_revision, unknown_snapshot, invalid_sha1, new_origin, ): .tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_badges.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_badges.py:68: in test_badge_errors client, url, status_code=200, content_type="image/svg+xml" _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ client = <django.test.client.Client object at 0x7f45dc3d8f28> url = '/badge/content/0dd0222617431b2eb3da0edf142b9736c572f2bd/' status_code = 200, content_type = 'image/svg+xml', http_origin = None server_name = None def check_http_get_response( client: Client, url: str, status_code: int, content_type: str = "*/*", http_origin: Optional[str] = None, server_name: Optional[str] = None, ) -> HttpResponse: """Helper function to check HTTP response for a GET request. Args: client: Django test client url: URL to check response status_code: expected HTTP status code content_type: expected response content type http_origin: optional HTTP_ORIGIN header value Returns: The HTTP response """ actual_response = client.get( url, HTTP_ACCEPT=content_type, HTTP_ORIGIN=http_origin, SERVER_NAME=server_name if server_name else "testserver", ) > assert isinstance(actual_response, Response) E assert False E + where False = isinstance(<HttpResponse status_code=200, "image/svg+xml">, Response) .tox/py3/lib/python3.7/site-packages/swh/web/tests/utils.py:66: AssertionError