Commit d833a4c2 authored by Yannick Kirschhoffer's avatar Yannick Kirschhoffer

Fixed argument parser module imports.

parent 17679119
#!/usr/bin/env python3
import sys
import params
from docker_ascii_map.argument_parser import get_input_parameters
from docker_ascii_map.ascii_render import Renderer
from docker_ascii_map.docker_config import ConfigParser
if __name__ == '__main__':
color_mode = params.get_input_parameters()[0]
color_mode = get_input_parameters()[0]
config_parser = ConfigParser()
renderer = Renderer()
......
......@@ -2,7 +2,7 @@ import unittest
from argparse import ArgumentParser
from unittest.mock import patch
import params
import docker_ascii_map.argument_parser
class Args:
......@@ -15,13 +15,13 @@ class ParametersTests(unittest.TestCase):
def test_monoterm(self):
with patch('os.getenv', return_value='vt100') as mock_getenv:
with patch.object(ArgumentParser, 'parse_args', return_value=Args()) as mock_parse:
r = params.get_input_parameters()
r = docker_ascii_map.argument_parser.get_input_parameters()
self.assertEqual(False, r[0])
def test_colorterm(self):
with patch('os.getenv', return_value='xterm-256color') as mock_getenv:
with patch.object(ArgumentParser, 'parse_args', return_value=Args()) as mock_parse:
r = params.get_input_parameters()
r = docker_ascii_map.argument_parser.get_input_parameters()
self.assertEqual(True, r[0])
......
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