This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
catfish/tests/__init__.py

17 lines
415 B
Python
Raw Normal View History

2018-12-12 15:53:56 +00:00
from unittest import TestCase
from click.testing import CliRunner
from catfish.__main__ import cli
2018-12-12 18:47:40 +00:00
from catfish import worker
import functools
2018-12-12 15:53:56 +00:00
class BaseTestCase(TestCase):
def setUp(self):
2018-12-12 18:47:40 +00:00
worker.stop_worker()
2018-12-12 15:53:56 +00:00
self.cli_runner = CliRunner()
self.cli = cli
2018-12-12 18:47:40 +00:00
self.run_cli = functools.partial(self.cli_runner.invoke, self.cli)
def tearDown(self):
worker.stop_worker()