2020-08-06 23:39:04 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import importlib
|
|
|
|
import tempfile
|
|
|
|
from unittest.mock import patch
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
from click.testing import CliRunner
|
|
|
|
from configparser import ConfigParser
|
|
|
|
|
|
|
|
PROJNAME = os.environ.get('PROJ','tmp_api')
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.incremental
|
|
|
|
class TestCliProj():
|
2020-09-25 01:06:21 +02:00
|
|
|
def test_cmds(self, project_runner):
|
|
|
|
assert project_runner('--help').exit_code == 0
|
|
|
|
#assert project_runner('run', '--help').exit_code == 0
|
|
|
|
#assert project_runner('domain', '--help').exit_code == 0
|
|
|
|
|
|
|
|
|
2020-10-07 09:52:23 +02:00
|
|
|
def test_domain_commands(self, project_runner):
|
|
|
|
r = project_runner('domain')
|
|
|
|
assert r.exit_code == 0
|
2020-09-25 01:06:21 +02:00
|
|
|
|
2020-10-07 09:52:23 +02:00
|
|
|
@pytest.mark.skip
|
|
|
|
def test_config_commands(self, project_runner):
|
|
|
|
try:
|
|
|
|
r = project_runner('config')
|
|
|
|
assert r.exit_code == 0
|
|
|
|
except AssertionError as exc:
|
|
|
|
subprocess.call(['tree', '-a'])
|
|
|
|
raise exc
|
2020-08-06 23:39:04 +02:00
|
|
|
|