mirror of
https://github.com/ai-robots-txt/ai.robots.txt.git
synced 2025-04-19 16:35:03 +00:00
Implementing htaccess generation
This commit is contained in:
parent
b7f908e305
commit
933aa6159d
4 changed files with 34 additions and 2 deletions
|
@ -6,7 +6,7 @@ cd to the `code` directory and run `pytest`
|
|||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from robots import json_to_txt, json_to_table
|
||||
from robots import json_to_txt, json_to_table, json_to_htaccess
|
||||
|
||||
|
||||
def test_robots_txt_creation():
|
||||
|
@ -19,3 +19,9 @@ def test_table_of_bot_metrices_md():
|
|||
robots_json = json.loads(Path("test_files/robots.json").read_text())
|
||||
robots_table = json_to_table(robots_json)
|
||||
assert Path("test_files/table-of-bot-metrics.md").read_text() == robots_table
|
||||
|
||||
|
||||
def test_htaccess_creation():
|
||||
robots_json = json.loads(Path("test_files/robots.json").read_text())
|
||||
robots_htaccess = json_to_htaccess(robots_json)
|
||||
assert Path("test_files/.htaccess").read_text() == robots_htaccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue