Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
May 11 2022, 12:28 PM
Details
client = <django.test.client.Client object at 0x7f0133f63da0> def test_coverage_view_with_focus(client): origins = ( listed_origins["origins"] + legacy_origins["origins"] + deposited_origins["origins"] ) focus = choices([o["type"] for o in origins], k=randint(1, 3)) # check view gets rendered without errors url = reverse("swh-coverage", query_params={"focus": ",".join(focus)}) resp = check_html_get_response( client, url, status_code=200, template_used="misc/coverage.html" ) # check focused elements assert_contains( resp, "swh-coverage-focus", count=len([o for o in origins if o["type"] in focus]), ) # check bootstrap cards are expanded assert_contains( resp, 'class="collapse show"', > count=len(origins), ) .tox/py3/lib/python3.7/site-packages/swh/web/tests/misc/test_coverage.py:165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/django/test/testcases.py:451: in assertContains msg_prefix + "Found %d instances of %s in response (expected %d)" % (real_count, text_repr, count) /usr/lib/python3.7/unittest/case.py:839: in assertEqual assertion_func(first, second, msg=msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <django.test.testcases.TestCase testMethod=run>, first = 0, second = 22 msg = '0 != 22 : Found 0 instances of \'class="collapse show"\' in response (expected 22)' def _baseAssertEqual(self, first, second, msg=None): """The default assertEqual implementation, not type specific.""" if not first == second: standardMsg = '%s != %s' % _common_shorten_repr(first, second) msg = self._formatMessage(msg, standardMsg) > raise self.failureException(msg) E AssertionError: 0 != 22 : Found 0 instances of 'class="collapse show"' in response (expected 22) /usr/lib/python3.7/unittest/case.py:832: AssertionError