From cf98b08fa5fbd39980756262c6fdc4160723c92b Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Wed, 1 Dec 2021 17:01:56 +0100 Subject: [PATCH] [tests] mv base domain test to halfapi/testing --- {tests => halfapi/testing}/test_domain.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename {tests => halfapi/testing}/test_domain.py (80%) diff --git a/tests/test_domain.py b/halfapi/testing/test_domain.py similarity index 80% rename from tests/test_domain.py rename to halfapi/testing/test_domain.py index 9c3cc73..26681a9 100644 --- a/tests/test_domain.py +++ b/halfapi/testing/test_domain.py @@ -5,13 +5,10 @@ import sys import json from unittest import TestCase from click.testing import CliRunner -from halfapi.cli.cli import cli +from ..cli.cli import cli from pprint import pprint class TestDomain(TestCase): - DOMAIN = 'dummy_domain' - ROUTERS = 'routers' - @property def router_module(self): return '.'.join((self.DOMAIN, self.ROUTERS)) @@ -44,11 +41,11 @@ class TestDomain(TestCase): def tearDown(self): pass - def test_routes(self): + def check_domain(self): result = self.runner.invoke(cli, '--version') self.assertEqual(result.exit_code, 0) - result = self.runner.invoke(cli, ['routes', '--export', self.router_module]) - self.assertEqual(result.exit_code, 0) print(result.stdout) - # result_d = json.loads(result.stdout) - # self.assertTrue() + result = self.runner.invoke(cli, ['domain', self.DOMAIN]) + self.assertEqual(result.exit_code, 0) + result_d = json.loads(result.stdout) + return result.stdout