mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-22 06:03:23 +02:00
test: test output permissions
This commit is contained in:
@@ -6,6 +6,8 @@ import subprocess
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from archivebox.config import OUTPUT_PERMISSIONS
|
||||||
|
|
||||||
from .fixtures import *
|
from .fixtures import *
|
||||||
|
|
||||||
def test_init(tmp_path, process):
|
def test_init(tmp_path, process):
|
||||||
@@ -43,3 +45,9 @@ def test_add_link_support_stdin(tmp_path, process):
|
|||||||
output_json = json.load(f)
|
output_json = json.load(f)
|
||||||
assert "Example Domain" == output_json['history']['title'][0]['output']
|
assert "Example Domain" == output_json['history']['title'][0]['output']
|
||||||
|
|
||||||
|
def test_correct_permissions_output_folder(tmp_path, process):
|
||||||
|
index_files = ['index.json', 'index.html', 'index.sqlite3', 'archive']
|
||||||
|
for file in index_files:
|
||||||
|
file_path = tmp_path / file
|
||||||
|
assert oct(file_path.stat().st_mode)[-3:] == OUTPUT_PERMISSIONS
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user