Browse Source

added test case of site

bugfixes
shital.rtcamp 10 years ago
parent
commit
b68a150850
  1. 16
      tests/cli/test_site_cd.py
  2. 67
      tests/cli/test_site_create.py
  3. 16
      tests/cli/test_site_disable.py
  4. 16
      tests/cli/test_site_edit.py
  5. 16
      tests/cli/test_site_enable.py
  6. 16
      tests/cli/test_site_info.py
  7. 16
      tests/cli/test_site_log.py
  8. 16
      tests/cli/test_site_show.py
  9. 74
      tests/cli/test_site_update.py
  10. 38
      tests/test_site_delete.py
  11. 22
      tests/test_site_list.py

16
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()

67
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()

16
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()

16
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()

16
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()

16
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()

16
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()

16
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()

74
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()

38
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()

22
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()
Loading…
Cancel
Save