configurationengine/source/scripts/tests/unittest_update.py
changeset 3 e7e0ae78773e
parent 0 2e8eeb919028
equal deleted inserted replaced
2:87cfa131b535 3:e7e0ae78773e
    21 import string
    21 import string
    22 import sys
    22 import sys
    23 import os
    23 import os
    24 import subprocess
    24 import subprocess
    25 import shutil
    25 import shutil
    26 import __init__
    26 
    27 from testautomation.base_testcase import BaseTestCase
    27 from testautomation.base_testcase import BaseTestCase
    28 from testautomation import unzip_file
    28 from testautomation import unzip_file
    29 from scripttest_common import get_cmd
    29 from scripttest_common import get_cmd
    30 from cone.public import api
    30 from cone.public import api
    31 
    31 
    47 class TestUpdate(BaseTestCase):
    47 class TestUpdate(BaseTestCase):
    48 
    48 
    49     def test_get_help(self):
    49     def test_get_help(self):
    50         cmd = '%s -h' % get_cmd('update')
    50         cmd = '%s -h' % get_cmd('update')
    51         out = self.run_command(cmd)
    51         out = self.run_command(cmd)
    52         lines = out.split('\r\n')
    52         lines = out.split(os.linesep)
    53         self.assertTrue('Options:' in lines)
    53         self.assertTrue('Options:' in lines)
    54         self.assertTrue('  Update options:' in lines)
    54         self.assertTrue('  Update options:' in lines)
    55 
    55 
    56     def test_add_and_remove_meta_in_filesystem_project(self):
    56     def test_add_and_remove_meta_in_filesystem_project(self):
    57         TEST_PROJECT_DIR = os.path.join(ROOT_PATH, 'temp/update/project')
    57         TEST_PROJECT_DIR = os.path.join(ROOT_PATH, 'temp/update/project')