Chris commited on
Commit
588393d
·
1 Parent(s): 6ee7dff

fix to cli test

Browse files
Files changed (1) hide show
  1. deep_translator/tests/test_cli.py +3 -3
deep_translator/tests/test_cli.py CHANGED
@@ -3,14 +3,14 @@
3
  """Tests for the CLI interface."""
4
 
5
  from click.testing import CliRunner
6
- from deep_translator import cli
7
 
8
  def results_test():
9
  runner = CliRunner()
10
- result = runner.invoke(cli.main, [ 'google', 'auto', 'en', '좋은'])
11
  assert result.exit_code == 0
12
  assert result == 'good'
13
 
14
- api_error = runner.invoke(cli.main, ['microsoft','auto','en','Zwei minimale Dellchen auf der Rückseite.'])
15
  assert api_error.exit_code == 0
16
  assert api_error == "This translator requires an api key provided through --api-key"
 
3
  """Tests for the CLI interface."""
4
 
5
  from click.testing import CliRunner
6
+ from deep_translator import __main__
7
 
8
  def results_test():
9
  runner = CliRunner()
10
+ result = runner.invoke(__main__.main, [ 'google', 'auto', 'en', '좋은'])
11
  assert result.exit_code == 0
12
  assert result == 'good'
13
 
14
+ api_error = runner.invoke(__main__.main, ['microsoft','auto','en','Zwei minimale Dellchen auf der Rückseite.'])
15
  assert api_error.exit_code == 0
16
  assert api_error == "This translator requires an api key provided through --api-key"