mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-06 19:06:08 +10:00
Add SSL, redirects, SEO plugin tests and fix fake test issues
- Add real integration tests for SSL, redirects, and SEO plugins using Chrome session helpers for live URL testing - Remove fake "format" tests that just created dicts and asserted on them (apt, pip, npm provider output format tests) - Remove npm integration test that created dirs then checked they existed - Fix SQLite search test to use SQLITEFTS_DB constant instead of hardcoded value
This commit is contained in:
@@ -111,29 +111,6 @@ class TestAptProviderHook(TestCase):
|
||||
self.assertNotIn('Traceback', result.stderr)
|
||||
|
||||
|
||||
class TestAptProviderOutput(TestCase):
|
||||
"""Test JSONL output format from apt provider."""
|
||||
|
||||
def test_binary_record_format(self):
|
||||
"""Binary JSONL records should have required fields."""
|
||||
record = {
|
||||
'type': 'Binary',
|
||||
'name': 'wget',
|
||||
'abspath': '/usr/bin/wget',
|
||||
'version': '1.21',
|
||||
'binprovider': 'apt',
|
||||
'sha256': '',
|
||||
'machine_id': 'machine-uuid',
|
||||
'binary_id': 'binary-uuid',
|
||||
}
|
||||
|
||||
self.assertEqual(record['type'], 'Binary')
|
||||
self.assertEqual(record['binprovider'], 'apt')
|
||||
self.assertIn('name', record)
|
||||
self.assertIn('abspath', record)
|
||||
self.assertIn('version', record)
|
||||
|
||||
|
||||
@pytest.mark.skipif(not is_linux(), reason="apt only available on Linux")
|
||||
@pytest.mark.skipif(not apt_available(), reason="apt not installed")
|
||||
class TestAptProviderSystemBinaries(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user