Scrapy, a fast high-level web crawling & scraping framework for Python.
Created new tests for implementation
Felipe Ruhland2521f031d6db
diff --git a/tests/test_commands.py b/tests/test_commands.pyindex 2e47160d7..42cade849 100644--- a/tests/test_commands.py+++ b/tests/test_commands.py@@ -73,6 +73,23 @@ class StartprojectTest(ProjectTest):self.assertEqual(1, self.call('startproject', 'wrong---project---name'))self.assertEqual(1, self.call('startproject', 'sys'))+ def test_startproject_with_project_dir(self):+ project_dir = mkdtemp()+ self.assertEqual(0, self.call('startproject', self.project_name, project_dir))++ assert exists(join(abspath(project_dir), 'scrapy.cfg'))+ assert exists(join(abspath(project_dir), 'testproject'))+ assert exists(join(join(abspath(project_dir), self.project_name), '__init__.py'))+ assert exists(join(join(abspath(project_dir), self.project_name), 'items.py'))+ assert exists(join(join(abspath(project_dir), self.project_name), 'pipelines.py'))+ assert exists(join(join(abspath(project_dir), self.project_name), 'settings.py'))+ assert exists(join(join(abspath(project_dir), self.project_name), 'spiders', '__init__.py'))++ self.assertEqual(1, self.call('startproject', self.project_name, project_dir))+ self.assertEqual(1, self.call('startproject', self.project_name + '2', project_dir))+ self.assertEqual(1, self.call('startproject', 'wrong---project---name'))+ self.assertEqual(1, self.call('startproject', 'sys'))+class StartprojectTemplatesTest(ProjectTest):