Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/api/views/test_content.py
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | def test_api_content_language_sha_not_found(self, unknown_content): | ||||
self.assertEqual(rv.status_code, 404) | self.assertEqual(rv.status_code, 404) | ||||
self.assertEqual(rv['Content-Type'], 'application/json') | self.assertEqual(rv['Content-Type'], 'application/json') | ||||
self.assertEqual(rv.data, { | self.assertEqual(rv.data, { | ||||
'exception': 'NotFoundExc', | 'exception': 'NotFoundExc', | ||||
'reason': 'No language information found for content ' | 'reason': 'No language information found for content ' | ||||
'sha1:%s.' % unknown_content['sha1'] | 'sha1:%s.' % unknown_content['sha1'] | ||||
}) | }) | ||||
@pytest.mark.xfail # Language indexer is disabled | |||||
@pytest.mark.skipif(ctags_json_missing, | @pytest.mark.skipif(ctags_json_missing, | ||||
reason="requires ctags with json output support") | reason="requires ctags with json output support") | ||||
@given(contents_with_ctags()) | @given(contents_with_ctags()) | ||||
def test_api_content_symbol(self, contents_with_ctags): | def test_api_content_symbol(self, contents_with_ctags): | ||||
expected_data = {} | expected_data = {} | ||||
for content_sha1 in contents_with_ctags['sha1s']: | for content_sha1 in contents_with_ctags['sha1s']: | ||||
self.content_add_ctags(content_sha1) | self.content_add_ctags(content_sha1) | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |