Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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())
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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())