|
@@ -277,3 +277,32 @@ class TestSiteWithConfig(object): |
|
|
assert not blog_node |
|
|
assert not blog_node |
|
|
git_node = s.content.node_from_relative_path('.git') |
|
|
git_node = s.content.node_from_relative_path('.git') |
|
|
assert not git_node |
|
|
assert not git_node |
|
|
|
|
|
|
|
|
|
|
|
class TestSimpleCopy(object): |
|
|
|
|
|
@classmethod |
|
|
|
|
|
def setup_class(cls): |
|
|
|
|
|
cls.SITE_PATH = File(__file__).parent.child_folder('sites/test_jinja_with_config') |
|
|
|
|
|
cls.SITE_PATH.make() |
|
|
|
|
|
TEST_SITE_ROOT.copy_contents_to(cls.SITE_PATH) |
|
|
|
|
|
|
|
|
|
|
|
@classmethod |
|
|
|
|
|
def teardown_class(cls): |
|
|
|
|
|
cls.SITE_PATH.delete() |
|
|
|
|
|
|
|
|
|
|
|
@nottest |
|
|
|
|
|
def setup_config(self, passthru): |
|
|
|
|
|
self.config_file = File(self.SITE_PATH.child('site.yaml')) |
|
|
|
|
|
with open(self.config_file.path) as config: |
|
|
|
|
|
conf = yaml.load(config) |
|
|
|
|
|
conf['simple_copy'] = passthru |
|
|
|
|
|
self.config = Config(sitepath=self.SITE_PATH, config_dict=conf) |
|
|
|
|
|
|
|
|
|
|
|
def test_simple_copy_basic(self): |
|
|
|
|
|
self.setup_config([ |
|
|
|
|
|
'about.html' |
|
|
|
|
|
]) |
|
|
|
|
|
s = Site(self.SITE_PATH, config=self.config) |
|
|
|
|
|
s.load() |
|
|
|
|
|
res = s.content.resource_from_relative_path('about.html') |
|
|
|
|
|
assert res |
|
|
|
|
|
assert res.simple_copy |