from click.testing import CliRunner

from shakedown import *
from dcos import config

def test_cli_require_dcos_uri():
    runner = CliRunner()
    with dcos_config():
        config.unset('core.dcos_url')
        result = runner.invoke(cli.main.cli)
        assert result.exit_code == 1

def test_cli_version():
    runner = CliRunner()
    result = runner.invoke(cli.main.cli, ['--version'])
    assert result.exit_code == 0
    assert result.output == "shakedown, version " + shakedown.VERSION + "\n"
    print(result.output)

@@ -79,16 +79,17 @@
 config%0A%0A
+%0A
 def test
@@ -245,16 +245,42 @@
 in.cli)%0A
+        print(dcos_url())%0A
         
@@ -309,16 +309,17 @@
 e == 1%0A%0A
+%0A
 def test

test in context only