As setUp is run for each test, the previous implementation was running pelican
twice (once for relative urls and once for absolute) for each test, which was not
really optimal :-).
Solution: make a base class which is inherated by a class for relative urls and
another for absolute urls.
Set the ASSET_URL to be relative to the 'theme/' url, which requires to use
{{ SITEURL }}/{{ ASSET_URL }} in the template and make it works with both
relative and absolute urls.
LC_ALL=C pelican -o tests/output/custom/ -s samples/pelican.conf.py samples/content/
we really need to merge #539 so that functional tests won't succeed if
output is different...
remove the unit tests for the lesscss generator (TestLessCSSGenerator class) and
replace it with tests for webassets:
- add a sample scss file
- run pelican with example files
- compare the generated css file with a reference one
- look in the html code for the correct link tag
Reverted templates back to checking author object, since a None object is possible. Name could be checked for blank if required
ATOM spec states an author element should be provided, so passes a blank name if not specified
Updated unit test
pandoc was checked directly with a `os.system` call, and the output with version
and copyright of pandoc was displayed when running tests.
- replace the pandoc check with the `skipIfNoExecutable` function.
- in `skipIfNoExecutable`, the `valid_exit_code` is not needed, the executable
is not found if an `OSError` exception is catched.
This caused the defaults to be overwritten and edge case bugs with tests.
The test for empty setting needed to be updated to reflect that the method
for setting up the local settings sets extra settings.
Used assertItemsEqual in article generation to create more precise tests than with an elif chain
Separated out categories out into their own named test for clarity
Closes#405
Used an exception so show error state.
Used a bool flag to make sure the error is only shown once PER error.
Updated tests to check for the correct Exception raised