def cleanup_skip(self): with patch('sys.stdout', self.stdout): with patch('sys.stderr', self.stderr): conf_data = config.parse([ '-q', '-s', '--db=postgres://user:pwd@host/dbname', '--i18n=no', '--django-version=1.11', '-f', '-p' + self.project_dir, 'example_prj' ]) install.cleanup_directory(conf_data) self.assertTrue(os.path.exists(self.project_dir))
def cleanup_ask(self): with patch('sys.stdout', self.stdout): with patch('sys.stderr', self.stderr): conf_data = config.parse([ '-q', '--db=postgres://user:pwd@host/dbname', '--i18n=no', '--django-version=1.11', '-f', '-p'+self.project_dir, 'example_prj']) install.cleanup_directory(conf_data) self.assertFalse(os.path.exists(self.project_dir))
def cleanup_ask(self): dj_version, dj_match = get_stable_django() with patch("sys.stdout", self.stdout): with patch("sys.stderr", self.stderr): conf_data = config.parse([ "-q", "--db=postgres://user:pwd@host/dbname", "--i18n=no", "--django-version=%s" % dj_version, "-f", "-p" + self.project_dir, "example_prj", ]) install.cleanup_directory(conf_data) self.assertFalse(os.path.exists(self.project_dir))