fediverse-blocklist-tool/tests/test_cli.py

22 lines
903 B
Python
Raw Permalink Normal View History

from fediverse_blocklist_tool.cli import get_format_from_filename
def test_get_format_from_filename():
assert "toml" == get_format_from_filename("temp.toml")
assert "csv" == get_format_from_filename("temp.csv")
assert "json" == get_format_from_filename("temp.json")
assert "md" == get_format_from_filename("temp.md")
assert "md" == get_format_from_filename("csv.md")
assert "md" == get_format_from_filename("toml.md")
assert "md" == get_format_from_filename("json.md")
assert "toml" == get_format_from_filename("csv.toml")
assert "toml" == get_format_from_filename("md.toml")
assert "toml" == get_format_from_filename("json.toml")
assert "toml" == get_format_from_filename("tmp")
assert "json" == get_format_from_filename("csv.json")
assert "json" == get_format_from_filename("md.json")
assert "json" == get_format_from_filename("toml.json")