Commit 18280568 authored by Jgiannelos's avatar Jgiannelos
Browse files

Add tests for CLI util

parent b6bc4a64
from argparse import Namespace
from unittest import TestCase, mock
from tileset.cli import main
class CliTest(TestCase):
return_value=Namespace(tilelist_path="/path/to/tilelist", minzoom=0, maxzoom=1),
def test_main(self, mock_parse_args):
test_input = ["0/0/0", "1/0/0"]
test_input_file = "\n".join(test_input)
mock_open = mock.mock_open(read_data=test_input_file)
with mock.patch("", mock_open):
with mock.patch("builtins.print") as mock_print:
call_list = ["1/0/1"),"1/1/0"),"0/0/0"),"1/0/0"),"1/1/1"),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment