def test_site_directory_is_file(self): site = tempfile.mkdtemp() file_site = os.path.join(site, 'fake') argv = self._make_argv_with() argv.append(file_site) with self.assertRaises(SystemExit): entry.main(argv)
def test_development_server_served(self, serve): site = self.factory.make_site() argv = self._make_argv_with(command='watch') argv.append(site.path) entry.main(argv) self.assertTrue(serve.called)
def test_complete_site_generation(self, finish): site = self.factory.make_site() argv = self._make_argv_with() argv.append(site.path) entry.main(argv) self.assertTrue(finish.called)
def test_debug_sets_logging(self): logger.setLevel(logging.CRITICAL) argv = self._make_argv_with('-d') with self.assertRaises(SystemExit): entry.main(argv) self.assertEqual(logging.DEBUG, logger.getEffectiveLevel())