Skip to content

Commit

Permalink
Fix the tests by patching 1.rst
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 9, 2015
1 parent 0f4b1e2 commit 1dc6ecf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/data/1-nolinks.rst
@@ -0,0 +1,28 @@
.. title: Welcome to Nikola
.. slug: welcome-to-nikola
.. date: 2012-03-30 23:00:00 UTC-03:00
.. tags: nikola, python, demo, blog
.. author: Roberto Alsina
.. link: https://getnikola.com/
.. description:
.. category: nikola
.. figure:: http://farm1.staticflickr.com/138/352972944_4f9d568680.jpg
:target: http://farm1.staticflickr.com/138/352972944_4f9d568680_z.jpg?zz=1
:class: thumbnail
:alt: Nikola Tesla Corner by nicwest, on Flickr

If you can see this in a web browser, it means you did something wrong, because
you should be reading a nice post with links, and this should be used in
the test suite only.

Next steps:

* Read the manual
* Visit the Nikola website to learn more
* See a demo photo gallery
* See a demo listing
* See a demo slideshow
* See a demo of the Bootstrap theme

Send feedback to info@getnikola.com!
6 changes: 6 additions & 0 deletions tests/test_integration.py
Expand Up @@ -105,6 +105,9 @@ def fill_site(self):
"""Fill the site with demo content."""
self.init_command.copy_sample_site(self.target_dir)
self.init_command.create_configuration(self.target_dir)
src1 = os.path.join(os.path.dirname(__file__), 'data', '1-nolinks.rst')
dst1 = os.path.join(self.target_dir, 'posts', '1.rst')
shutil.copy(src1, dst1)
# File for Issue #374 (empty post text)
with io.open(os.path.join(self.target_dir, 'posts', 'empty.txt'), "w+", encoding="utf8") as outf:
outf.write(
Expand Down Expand Up @@ -526,6 +529,9 @@ def fill_site(self):
"""Fill the site with demo content."""
self.init_command.copy_sample_site(self.target_dir)
self.init_command.create_configuration(self.target_dir)
src1 = os.path.join(os.path.dirname(__file__), 'data', '1-nolinks.rst')
dst1 = os.path.join(self.target_dir, 'posts', '1.rst')
shutil.copy(src1, dst1)
os.system('rm "{0}/stories/creating-a-theme.rst" "{0}/stories/extending.txt" "{0}/stories/internals.txt" "{0}/stories/manual.rst" "{0}/stories/social_buttons.txt" "{0}/stories/theming.rst" "{0}/stories/upgrading-to-v6.txt"'.format(self.target_dir))

def test_invariance(self):
Expand Down

0 comments on commit 1dc6ecf

Please sign in to comment.