From c860beb4d5b218642255a6aadcf8b5371938df03 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Sat, 6 Sep 2014 11:38:57 +0200 Subject: [PATCH] Fix broken imports. --- tests/test_scripts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_scripts.py b/tests/test_scripts.py index 8c5e0fc..4794059 100644 --- a/tests/test_scripts.py +++ b/tests/test_scripts.py @@ -6,7 +6,8 @@ from click.testing import CliRunner from rq import get_failed_queue from rq.compat import is_python_version from rq.job import Job -from rq.scripts import read_config_file, rq_cli +from rq.cli import main +from rq.scripts import read_config_file from tests import RQTestCase from tests.fixtures import div_by_zero @@ -39,14 +40,14 @@ class TestRQCli(RQTestCase): def test_empty(self): """rq -u empty -y""" runner = CliRunner() - result = runner.invoke(rq_cli.main, ['-u', self.redis_url, 'empty', "-y"]) + result = runner.invoke(main, ['-u', self.redis_url, 'empty', "-y"]) self.assertEqual(result.exit_code, 0) self.assertEqual(result.output, '1 jobs removed from failed queue\n') def test_requeue(self): """rq -u requeue""" runner = CliRunner() - result = runner.invoke(rq_cli.main, ['-u', self.redis_url, 'requeue', '-a']) + result = runner.invoke(main, ['-u', self.redis_url, 'requeue', '-a']) self.assertEqual(result.exit_code, 0) self.assertIn('Requeueing 1 jobs from FailedQueue', result.output) self.assertIn('Unable to requeue 0 jobs from FailedQueue', result.output) @@ -54,6 +55,6 @@ class TestRQCli(RQTestCase): def test_info(self): """rq -u info -i 0""" runner = CliRunner() - result = runner.invoke(rq_cli.main, ['-u', self.redis_url, 'info', '-i 0']) + result = runner.invoke(main, ['-u', self.redis_url, 'info', '-i 0']) self.assertEqual(result.exit_code, 0) self.assertIn('1 queues, 1 jobs total', result.output)