Skip to content

Commit 27c3e1d

Browse files
author
bluepizzey
committed
Moved the cli.py file into a bin folder.
1 parent 3b07049 commit 27c3e1d

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

eridu/cli.py renamed to bin/run_eridu.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def main(start):
2121

2222
logger.info('Starting on page {}'.format(page))
2323
logger.info('Filtering to include the following tags: {}.'.format(tags))
24+
logger.info('Getting requests every {} seconds.'.format(SECONDS_BETWEEN_REQUESTS))
2425

2526
def run(params):
2627
page = params.get('page')

eridu/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
ANSWERS_ORDER = os.environ.get('ERIDU_ANSWERS_ORDER', 'asc')
2222

2323
FILTER_TAGS = os.environ.get('ERIDU_FILTER_TAGS', 'python,python-2.x,python-3.x')
24-
SECONDS_BETWEEN_REQUESTS = os.environ.get('ERIDU_SECONDS_BETWEEN_REQUESTS', 300)
24+
SECONDS_BETWEEN_REQUESTS = int(os.environ.get('ERIDU_SECONDS_BETWEEN_REQUESTS', 300))

tests/test_eridu.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
from click.testing import CliRunner
1616

1717
from eridu import eridu
18-
from eridu import cli
19-
2018

2119

2220
class TestEridu(unittest.TestCase):
@@ -32,10 +30,8 @@ def test_000_something(self):
3230

3331
def test_command_line_interface(self):
3432
runner = CliRunner()
35-
result = runner.invoke(cli.main)
3633
assert result.exit_code == 0
3734
assert 'eridu.cli.main' in result.output
38-
help_result = runner.invoke(cli.main, ['--help'])
3935
assert help_result.exit_code == 0
4036
assert '--help Show this message and exit.' in help_result.output
4137

0 commit comments

Comments
 (0)