From e9193445afa85556847d0ad9a07421978ccf2e0f Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Thu, 8 Dec 2011 15:39:04 +0530 Subject: [PATCH] Added more tests for multiple and path based matches for simple copy --- hyde/tests/test_site.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/hyde/tests/test_site.py b/hyde/tests/test_site.py index af5c658..9d5e771 100644 --- a/hyde/tests/test_site.py +++ b/hyde/tests/test_site.py @@ -306,3 +306,33 @@ class TestSimpleCopy(object): res = s.content.resource_from_relative_path('about.html') assert res assert res.simple_copy + + def test_simple_copy_directory(self): + self.setup_config([ + '**/*.html' + ]) + s = Site(self.SITE_PATH, config=self.config) + s.load() + res = s.content.resource_from_relative_path('about.html') + assert res + assert not res.simple_copy + res = s.content.resource_from_relative_path('blog/2010/december/merry-christmas.html') + assert res + assert res.simple_copy + + def test_simple_copy_multiple(self): + self.setup_config([ + '**/*.html', + 'media/css/*.css' + ]) + s = Site(self.SITE_PATH, config=self.config) + s.load() + res = s.content.resource_from_relative_path('about.html') + assert res + assert not res.simple_copy + res = s.content.resource_from_relative_path('blog/2010/december/merry-christmas.html') + assert res + assert res.simple_copy + res = s.content.resource_from_relative_path('media/css/site.css') + assert res + assert res.simple_copy