From b68a15085055e4def71c917a107f83dae1006d81 Mon Sep 17 00:00:00 2001 From: "shital.rtcamp" Date: Mon, 19 Jan 2015 11:35:36 +0530 Subject: [PATCH 1/2] added test case of site --- tests/cli/test_site_cd.py | 16 ++++++++ tests/cli/test_site_create.py | 67 ++++++++++++++++++++++++++++++ tests/cli/test_site_disable.py | 16 ++++++++ tests/cli/test_site_edit.py | 16 ++++++++ tests/cli/test_site_enable.py | 16 ++++++++ tests/cli/test_site_info.py | 16 ++++++++ tests/cli/test_site_log.py | 16 ++++++++ tests/cli/test_site_show.py | 16 ++++++++ tests/cli/test_site_update.py | 74 ++++++++++++++++++++++++++++++++++ tests/test_site_delete.py | 38 +++++++++++++++++ tests/test_site_list.py | 22 ++++++++++ 11 files changed, 313 insertions(+) create mode 100644 tests/cli/test_site_cd.py create mode 100644 tests/cli/test_site_create.py create mode 100644 tests/cli/test_site_disable.py create mode 100644 tests/cli/test_site_edit.py create mode 100644 tests/cli/test_site_enable.py create mode 100644 tests/cli/test_site_info.py create mode 100644 tests/cli/test_site_log.py create mode 100644 tests/cli/test_site_show.py create mode 100644 tests/cli/test_site_update.py create mode 100644 tests/test_site_delete.py create mode 100644 tests/test_site_list.py diff --git a/tests/cli/test_site_cd.py b/tests/cli/test_site_cd.py new file mode 100644 index 00000000..fd8e3d01 --- /dev/null +++ b/tests/cli/test_site_cd.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_show_cd(self): + self.app = get_test_app(argv=['site', 'cd', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_create.py b/tests/cli/test_site_create.py new file mode 100644 index 00000000..fa3f1755 --- /dev/null +++ b/tests/cli/test_site_create.py @@ -0,0 +1,67 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_html(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--html']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_php(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--php']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_mysql(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', + '--mysql']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_wp(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--wp']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_wpsubdir(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', + '--wpsubdir']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_wpsubdomain(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', + '--wpsubdomain']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_w3tc(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--w3tc']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_wpfc(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--wpfc']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_create_wpsc(self): + self.app = get_test_app(argv=['site', 'create', 'site_name', '--wpsc']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_disable.py b/tests/cli/test_site_disable.py new file mode 100644 index 00000000..1b946532 --- /dev/null +++ b/tests/cli/test_site_disable.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_disable(self): + self.app = get_test_app(argv=['site', 'disable', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_edit.py b/tests/cli/test_site_edit.py new file mode 100644 index 00000000..8a26d67d --- /dev/null +++ b/tests/cli/test_site_edit.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_edit(self): + self.app = get_test_app(argv=['site', 'edit', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_enable.py b/tests/cli/test_site_enable.py new file mode 100644 index 00000000..d2ec6f55 --- /dev/null +++ b/tests/cli/test_site_enable.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_enable(self): + self.app = get_test_app(argv=['site', 'enable', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_info.py b/tests/cli/test_site_info.py new file mode 100644 index 00000000..26575a42 --- /dev/null +++ b/tests/cli/test_site_info.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_info(self): + self.app = get_test_app(argv=['site', 'info', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_log.py b/tests/cli/test_site_log.py new file mode 100644 index 00000000..89717f10 --- /dev/null +++ b/tests/cli/test_site_log.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_log(self): + self.app = get_test_app(argv=['site', 'log', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_show.py b/tests/cli/test_site_show.py new file mode 100644 index 00000000..5c6b4b7c --- /dev/null +++ b/tests/cli/test_site_show.py @@ -0,0 +1,16 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_show_edit(self): + self.app = get_test_app(argv=['site', 'show', 'site_name']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_update.py b/tests/cli/test_site_update.py new file mode 100644 index 00000000..cae89092 --- /dev/null +++ b/tests/cli/test_site_update.py @@ -0,0 +1,74 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', + '--password']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_html(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--html']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_php(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--php']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_mysql(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', + '--mysql']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_wp(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--wp']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_wpsubdir(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', + '--wpsubdir']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_wpsubdomain(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', + '--wpsubdomain']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_w3tc(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--w3tc']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_wpfc(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--wpfc']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_update_wpsc(self): + self.app = get_test_app(argv=['site', 'update', 'site_name', '--wpsc']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/test_site_delete.py b/tests/test_site_delete.py new file mode 100644 index 00000000..322a59ba --- /dev/null +++ b/tests/test_site_delete.py @@ -0,0 +1,38 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_detele(self): + self.app = get_test_app(argv=['site', 'delete', 'site_name', + '--no-prompt']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_detele_all(self): + self.app = get_test_app(argv=['site', 'delete', 'site_name', + '--all']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_detele_db(self): + self.app = get_test_app(argv=['site', 'delete', 'site_name', + '--db']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_detele_files(self): + self.app = get_test_app(argv=['site', 'delete', 'site_name', + '--files']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/test_site_list.py b/tests/test_site_list.py new file mode 100644 index 00000000..477e6915 --- /dev/null +++ b/tests/test_site_list.py @@ -0,0 +1,22 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSite(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_list_enable(self): + self.app = get_test_app(argv=['site', 'list', '--enabled']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_site_list_disable(self): + self.app = get_test_app(argv=['site', 'list', '--disabled']) + self.app.setup() + self.app.run() + self.app.close() From 11ca0fdd8cda2900071c69f3f6015494b40295d2 Mon Sep 17 00:00:00 2001 From: "shital.rtcamp" Date: Mon, 19 Jan 2015 14:19:17 +0530 Subject: [PATCH 2/2] changes done in test case --- tests/cli/test_clean.py | 40 +++++++++++ tests/cli/test_debug.py | 101 ++++++++++++++++++++++++++++ tests/cli/test_ee.py | 67 ------------------ tests/cli/test_info.py | 28 ++++++++ tests/cli/test_secure.py | 28 ++++++++ tests/cli/test_site_cd.py | 2 +- tests/cli/test_site_create.py | 24 ++++--- tests/{ => cli}/test_site_delete.py | 8 +-- tests/cli/test_site_disable.py | 2 +- tests/cli/test_site_edit.py | 2 +- tests/cli/test_site_enable.py | 2 +- tests/cli/test_site_info.py | 2 +- tests/{ => cli}/test_site_list.py | 0 tests/cli/test_site_log.py | 2 +- tests/cli/test_site_show.py | 2 +- tests/cli/test_site_update.py | 26 ++++--- 16 files changed, 239 insertions(+), 97 deletions(-) create mode 100644 tests/cli/test_clean.py create mode 100644 tests/cli/test_debug.py delete mode 100644 tests/cli/test_ee.py create mode 100644 tests/cli/test_info.py create mode 100644 tests/cli/test_secure.py rename tests/{ => cli}/test_site_delete.py (75%) rename tests/{ => cli}/test_site_list.py (100%) diff --git a/tests/cli/test_clean.py b/tests/cli/test_clean.py new file mode 100644 index 00000000..39254bff --- /dev/null +++ b/tests/cli/test_clean.py @@ -0,0 +1,40 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseClean(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_clean(self): + self.app = get_test_app(argv=['clean']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_clean_fastcgi(self): + self.app = get_test_app(argv=['clean', '--fastcgi']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_clean_all(self): + self.app = get_test_app(argv=['clean', '--all']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_clean_memcache(self): + self.app = get_test_app(argv=['clean', '--memcache']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_clean_opcache(self): + self.app = get_test_app(argv=['clean', '--opcache']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_debug.py b/tests/cli/test_debug.py new file mode 100644 index 00000000..8d02c28e --- /dev/null +++ b/tests/cli/test_debug.py @@ -0,0 +1,101 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseDebug(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_stop(self): + self.app = get_test_app(argv=['debug', '--stop']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_start(self): + self.app = get_test_app(argv=['debug', '--start']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_php(self): + self.app = get_test_app(argv=['debug', '--php']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_nginx(self): + self.app = get_test_app(argv=['debug', '--nginx']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_rewrite(self): + self.app = get_test_app(argv=['debug', '--rewrite']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_fpm(self): + self.app = get_test_app(argv=['debug', '--fpm']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_mysql(self): + self.app = get_test_app(argv=['debug', '--mysql']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_import_slow_log_interval(self): + self.app = get_test_app(argv=['debug', '--mysql', + '--import-slow-log-interval']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_mysql(self): + self.app = get_test_app(argv=['debug', 'example3.com', '--mysql']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_wp(self): + self.app = get_test_app(argv=['debug', 'example4.com', '--wp']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_nginx(self): + self.app = get_test_app(argv=['debug', 'example4.com', '--nginx']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_start(self): + self.app = get_test_app(argv=['debug', 'example.com', '--start']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_stop(self): + self.app = get_test_app(argv=['debug', 'example.com', '--stop']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug_site_name_rewrite(self): + self.app = get_test_app(argv=['debug', 'example.com', '--rewrite']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_debug(self): + self.app = get_test_app(argv=['debug']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_ee.py b/tests/cli/test_ee.py deleted file mode 100644 index f02da325..00000000 --- a/tests/cli/test_ee.py +++ /dev/null @@ -1,67 +0,0 @@ -"""CLI tests for ee.""" - -from ee.utils import test -from ee.cli.main import get_test_app - - -class CliTestCase(test.EETestCase): - def test_ee_cli(self): - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_create(self): - self.app = get_test_app(argv=['site', 'create', 'example.com']) - self.app.setup() - self.app.run() - data, output = self.app.last_rendered - self.eq(output, 'Inside EESiteCreateController.default().\n') - self.app.close() - - def test_ee_cli_site_update(self): - self.app = get_test_app(argv=['site', 'update', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_delete(self): - self.app = get_test_app(argv=['site', 'delete', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_cd(self): - self.app = get_test_app(argv=['site', 'cd', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_log(self): - self.app = get_test_app(argv=['site', 'log', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_info(self): - self.app = get_test_app(argv=['site', 'info', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_enable(self): - self.app = get_test_app(argv=['site', 'enable', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_disable(self): - self.app = get_test_app(argv=['site', 'disable', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() - - def test_ee_cli_site_edit(self): - self.app = get_test_app(argv=['site', 'edit', 'example.com']) - self.app.setup() - self.app.run() - self.app.close() diff --git a/tests/cli/test_info.py b/tests/cli/test_info.py new file mode 100644 index 00000000..0c36edb4 --- /dev/null +++ b/tests/cli/test_info.py @@ -0,0 +1,28 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseInfo(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_info_mysql(self): + self.app = get_test_app(argv=['info', '--mysql']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_info_php(self): + self.app = get_test_app(argv=['info', '--php']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_info_nginx(self): + self.app = get_test_app(argv=['info', '--nginx']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_secure.py b/tests/cli/test_secure.py new file mode 100644 index 00000000..d867a2e8 --- /dev/null +++ b/tests/cli/test_secure.py @@ -0,0 +1,28 @@ +from ee.utils import test +from ee.cli.main import get_test_app + + +class CliTestCaseSecure(test.EETestCase): + + def test_ee_cli(self): + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_secure_auth(self): + self.app = get_test_app(argv=['secure', '--auth']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_secure_port(self): + self.app = get_test_app(argv=['secure', '--port']) + self.app.setup() + self.app.run() + self.app.close() + + def test_ee_cli_secure_ip(self): + self.app = get_test_app(argv=['secure', '--ip']) + self.app.setup() + self.app.run() + self.app.close() diff --git a/tests/cli/test_site_cd.py b/tests/cli/test_site_cd.py index fd8e3d01..51d55bec 100644 --- a/tests/cli/test_site_cd.py +++ b/tests/cli/test_site_cd.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_show_cd(self): - self.app = get_test_app(argv=['site', 'cd', 'site_name']) + self.app = get_test_app(argv=['site', 'cd', 'example.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_create.py b/tests/cli/test_site_create.py index fa3f1755..3b3a2554 100644 --- a/tests/cli/test_site_create.py +++ b/tests/cli/test_site_create.py @@ -10,58 +10,64 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_create_html(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--html']) + self.app = get_test_app(argv=['site', 'create', 'example1.com', + '--html']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_php(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--php']) + self.app = get_test_app(argv=['site', 'create', 'example2.com', + '--php']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_mysql(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', + self.app = get_test_app(argv=['site', 'create', 'example3.com', '--mysql']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_wp(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--wp']) + self.app = get_test_app(argv=['site', 'create', 'example4.com', + '--wp']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_wpsubdir(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', + self.app = get_test_app(argv=['site', 'create', 'example5.com', '--wpsubdir']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_wpsubdomain(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', + self.app = get_test_app(argv=['site', 'create', 'example6.com', '--wpsubdomain']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_w3tc(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--w3tc']) + self.app = get_test_app(argv=['site', 'create', 'example7.com', + '--w3tc']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_wpfc(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--wpfc']) + self.app = get_test_app(argv=['site', 'create', 'example8.com', + '--wpfc']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_create_wpsc(self): - self.app = get_test_app(argv=['site', 'create', 'site_name', '--wpsc']) + self.app = get_test_app(argv=['site', 'create', 'example9.com', + '--wpsc']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/test_site_delete.py b/tests/cli/test_site_delete.py similarity index 75% rename from tests/test_site_delete.py rename to tests/cli/test_site_delete.py index 322a59ba..2a2dfe8d 100644 --- a/tests/test_site_delete.py +++ b/tests/cli/test_site_delete.py @@ -10,28 +10,28 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_detele(self): - self.app = get_test_app(argv=['site', 'delete', 'site_name', + self.app = get_test_app(argv=['site', 'delete', 'example1.com', '--no-prompt']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_detele_all(self): - self.app = get_test_app(argv=['site', 'delete', 'site_name', + self.app = get_test_app(argv=['site', 'delete', 'example2.com', '--all']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_detele_db(self): - self.app = get_test_app(argv=['site', 'delete', 'site_name', + self.app = get_test_app(argv=['site', 'delete', 'example3.com', '--db']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_detele_files(self): - self.app = get_test_app(argv=['site', 'delete', 'site_name', + self.app = get_test_app(argv=['site', 'delete', 'example4.com', '--files']) self.app.setup() self.app.run() diff --git a/tests/cli/test_site_disable.py b/tests/cli/test_site_disable.py index 1b946532..3d948f77 100644 --- a/tests/cli/test_site_disable.py +++ b/tests/cli/test_site_disable.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_disable(self): - self.app = get_test_app(argv=['site', 'disable', 'site_name']) + self.app = get_test_app(argv=['site', 'disable', 'example2.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_edit.py b/tests/cli/test_site_edit.py index 8a26d67d..ebeee4f5 100644 --- a/tests/cli/test_site_edit.py +++ b/tests/cli/test_site_edit.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_edit(self): - self.app = get_test_app(argv=['site', 'edit', 'site_name']) + self.app = get_test_app(argv=['site', 'edit', 'example1.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_enable.py b/tests/cli/test_site_enable.py index d2ec6f55..87cc4f85 100644 --- a/tests/cli/test_site_enable.py +++ b/tests/cli/test_site_enable.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_enable(self): - self.app = get_test_app(argv=['site', 'enable', 'site_name']) + self.app = get_test_app(argv=['site', 'enable', 'example2.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_info.py b/tests/cli/test_site_info.py index 26575a42..1ecc2062 100644 --- a/tests/cli/test_site_info.py +++ b/tests/cli/test_site_info.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_info(self): - self.app = get_test_app(argv=['site', 'info', 'site_name']) + self.app = get_test_app(argv=['site', 'info', 'example1.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/test_site_list.py b/tests/cli/test_site_list.py similarity index 100% rename from tests/test_site_list.py rename to tests/cli/test_site_list.py diff --git a/tests/cli/test_site_log.py b/tests/cli/test_site_log.py index 89717f10..e73f4c6f 100644 --- a/tests/cli/test_site_log.py +++ b/tests/cli/test_site_log.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_log(self): - self.app = get_test_app(argv=['site', 'log', 'site_name']) + self.app = get_test_app(argv=['site', 'log', 'example1.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_show.py b/tests/cli/test_site_show.py index 5c6b4b7c..ba6c4f1f 100644 --- a/tests/cli/test_site_show.py +++ b/tests/cli/test_site_show.py @@ -10,7 +10,7 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_show_edit(self): - self.app = get_test_app(argv=['site', 'show', 'site_name']) + self.app = get_test_app(argv=['site', 'show', 'example.com']) self.app.setup() self.app.run() self.app.close() diff --git a/tests/cli/test_site_update.py b/tests/cli/test_site_update.py index cae89092..3f46d400 100644 --- a/tests/cli/test_site_update.py +++ b/tests/cli/test_site_update.py @@ -10,65 +10,71 @@ class CliTestCaseSite(test.EETestCase): self.app.close() def test_ee_cli_site_update(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', + self.app = get_test_app(argv=['site', 'update', 'example.com', '--password']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_html(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--html']) + self.app = get_test_app(argv=['site', 'update', 'example1.com', + '--html']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_php(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--php']) + self.app = get_test_app(argv=['site', 'update', 'example2.com', + '--php']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_mysql(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', + self.app = get_test_app(argv=['site', 'update', 'example3.com', '--mysql']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_wp(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--wp']) + self.app = get_test_app(argv=['site', 'update', 'example4.com', + '--wp']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_wpsubdir(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', + self.app = get_test_app(argv=['site', 'update', 'example5.com', '--wpsubdir']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_wpsubdomain(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', + self.app = get_test_app(argv=['site', 'update', 'example6.com', '--wpsubdomain']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_w3tc(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--w3tc']) + self.app = get_test_app(argv=['site', 'update', 'example7.com', + '--w3tc']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_wpfc(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--wpfc']) + self.app = get_test_app(argv=['site', 'update', 'example8.com', + '--wpfc']) self.app.setup() self.app.run() self.app.close() def test_ee_cli_site_update_wpsc(self): - self.app = get_test_app(argv=['site', 'update', 'site_name', '--wpsc']) + self.app = get_test_app(argv=['site', 'update', 'example9.com', + '--wpsc']) self.app.setup() self.app.run() self.app.close()