restore test_basic_generation_works functional test

This commit is contained in:
Bruno Binet 2012-11-24 00:46:03 +01:00
commit 080c884c1a

View file

@ -62,22 +62,17 @@ class TestPelican(unittest.TestCase):
self.assertEqual(diff['right_only'], [], msg=msg) self.assertEqual(diff['right_only'], [], msg=msg)
self.assertEqual(diff['diff_files'], [], msg=msg) self.assertEqual(diff['diff_files'], [], msg=msg)
@unittest.skip("Test failing")
def test_basic_generation_works(self): def test_basic_generation_works(self):
# when running pelican without settings, it should pick up the default # when running pelican without settings, it should pick up the default
# ones and generate the output without raising any exception / issuing # ones and generate correct output without raising any exception
# any warning. settings = read_settings(filename=None, override={
with patch("pelican.contents.getenv") as mock_getenv: 'PATH': INPUT_PATH,
# force getenv('USER') to always return the same value 'OUTPUT_PATH': self.temp_path,
mock_getenv.return_value = "Dummy Author" })
settings = read_settings(filename=None, override={ pelican = Pelican(settings=settings)
'PATH': INPUT_PATH, pelican.run()
'OUTPUT_PATH': self.temp_path, dcmp = dircmp(self.temp_path, os.sep.join((OUTPUT_PATH, "basic")))
}) self.assertFilesEqual(recursiveDiff(dcmp))
pelican = Pelican(settings=settings)
pelican.run()
dcmp = dircmp(self.temp_path, os.sep.join((OUTPUT_PATH, "basic")))
self.assertFilesEqual(recursiveDiff(dcmp))
def test_custom_generation_works(self): def test_custom_generation_works(self):
# the same thing with a specified set of settings should work # the same thing with a specified set of settings should work