def test_setup_if_htdocs_with_stand_alone_app(self): shutil.copytree('tests/data/app-5', self.build_dir) setup_htdocs_if_it_doesnt_exist(utils.FormattedDict({ 'BUILD_DIR': self.build_dir, 'WEB_SERVER': 'none' })) self.assert_exists(self.build_dir, 'app.php') eq_(1, len(os.listdir(self.build_dir)))
def test_setup_if_htdocs_does_not_exist(self): shutil.copytree('tests/data/app-2', self.build_dir) setup_htdocs_if_it_doesnt_exist( utils.FormattedDict({'BUILD_DIR': self.build_dir})) self.assert_exists(self.build_dir, 'htdocs') self.assert_exists(self.build_dir, 'htdocs', 'index.php') self.assert_exists(self.build_dir, 'htdocs', 'info.php') self.assert_exists(self.build_dir, 'htdocs', 'technical-difficulties1.jpg') self.assert_exists(self.build_dir, '.bp-config') self.assert_exists(self.build_dir, '.bp-config', 'options.json') self.assert_exists(self.build_dir, '.bp-config', 'httpd', 'extra', 'httpd-remoteip.conf') eq_(2, len(os.listdir(self.build_dir))) eq_(3, len(os.listdir(os.path.join(self.build_dir, 'htdocs'))))
def test_setup_if_htdocs_does_not_exist(self): shutil.copytree('tests/data/app-2', self.build_dir) setup_htdocs_if_it_doesnt_exist(utils.FormattedDict({ 'BUILD_DIR': self.build_dir })) self.assert_exists(self.build_dir, 'htdocs') self.assert_exists(self.build_dir, 'htdocs', 'index.php') self.assert_exists(self.build_dir, 'htdocs', 'info.php') self.assert_exists(self.build_dir, 'htdocs', 'technical-difficulties1.jpg') self.assert_exists(self.build_dir, '.bp-config') self.assert_exists(self.build_dir, '.bp-config', 'options.json') self.assert_exists(self.build_dir, '.bp-config', 'httpd', 'extra', 'httpd-remoteip.conf') eq_(2, len(os.listdir(self.build_dir))) eq_(3, len(os.listdir(os.path.join(self.build_dir, 'htdocs'))))