Init
This commit is contained in:
3
tests/__init__.py
Normal file
3
tests/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Unit test package for erepublik_script."""
|
34
tests/test_erepublik_script.py
Normal file
34
tests/test_erepublik_script.py
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""Tests for `erepublik_script` package."""
|
||||
|
||||
|
||||
import unittest
|
||||
from click.testing import CliRunner
|
||||
|
||||
from erepublik_script import erepublik_script
|
||||
from erepublik_script import cli
|
||||
|
||||
|
||||
class TestErepublik_script(unittest.TestCase):
|
||||
"""Tests for `erepublik_script` package."""
|
||||
|
||||
def setUp(self):
|
||||
"""Set up test fixtures, if any."""
|
||||
|
||||
def tearDown(self):
|
||||
"""Tear down test fixtures, if any."""
|
||||
|
||||
def test_000_something(self):
|
||||
"""Test something."""
|
||||
|
||||
def test_command_line_interface(self):
|
||||
"""Test the CLI."""
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli.main)
|
||||
assert result.exit_code == 0
|
||||
assert 'erepublik_script.cli.main' in result.output
|
||||
help_result = runner.invoke(cli.main, ['--help'])
|
||||
assert help_result.exit_code == 0
|
||||
assert '--help Show this message and exit.' in help_result.output
|
Reference in New Issue
Block a user