| Total Complexity | 7 | 
| Total Lines | 39 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | #!/usr/bin/env python | ||
| 2 | # -*- coding: utf-8 -*- | ||
| 3 | |||
| 4 | """Tests for `module_renamer` package.""" | ||
| 5 | |||
| 6 | import pytest | ||
| 7 | |||
| 8 | from click.testing import CliRunner | ||
| 9 | |||
| 10 | from module_renamer import module_renamer | ||
| 11 | from module_renamer import cli | ||
| 12 | |||
| 13 | |||
| 14 | @pytest.fixture | ||
| 15 | def response(): | ||
| 16 | """Sample pytest fixture. | ||
| 17 | |||
| 18 | See more at: http://doc.pytest.org/en/latest/fixture.html | ||
| 19 | """ | ||
| 20 | # import requests | ||
| 21 |     # return requests.get('https://github.com/audreyr/cookiecutter-pypackage')
 | ||
| 22 | |||
| 23 | |||
| 24 | def test_content(response): | ||
| 25 | """Sample pytest test function with the pytest fixture as an argument.""" | ||
| 26 | # from bs4 import BeautifulSoup | ||
| 27 | # assert 'GitHub' in BeautifulSoup(response.content).title.string | ||
| 28 | |||
| 29 | |||
| 30 | def test_command_line_interface(): | ||
| 31 | """Test the CLI.""" | ||
| 32 | runner = CliRunner() | ||
| 33 | result = runner.invoke(cli.main) | ||
| 34 | assert result.exit_code == 0 | ||
| 35 | assert 'module_renamer.cli.main' in result.output | ||
| 36 | help_result = runner.invoke(cli.main, ['--help']) | ||
| 37 | assert help_result.exit_code == 0 | ||
| 38 | assert '--help Show this message and exit.' in help_result.output | ||
| 39 |