Browse Source

Added more tests for multiple and path based matches for simple copy

main
Lakshmi Vyasarajan 13 years ago
parent
commit
e9193445af
1 changed files with 30 additions and 0 deletions
  1. +30
    -0
      hyde/tests/test_site.py

+ 30
- 0
hyde/tests/test_site.py View File

@@ -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

Loading…
Cancel
Save