~andreserl/pyjuju/cloud-init-orchestra-lp850260

« back to all changes in this revision

Viewing changes to ensemble/formula/tests/test_bundle.py

[r=hazmat,jimbaker] Merging fix to test to ensure hook is executable
without setting explicit mode bits.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    def test_executable_extraction(self):
84
84
        sample_directory = os.path.join(repository_directory, "varnish2")
85
85
        formula_directory = FormulaDirectory(sample_directory)
 
86
        source_hook_path = os.path.join(sample_directory, "hooks", "install")
 
87
        self.assertTrue(os.access(source_hook_path, os.X_OK))
86
88
        bundle = formula_directory.as_bundle()
87
89
        directory = bundle.as_directory()
88
90
        hook_path = os.path.join(directory.path, "hooks", "install")
89
 
        self.assertEqual(stat.S_IMODE(os.stat(hook_path)[0]), 493)
 
91
        self.assertTrue(os.access(hook_path, os.X_OK))
90
92
 
91
93
    def get_formula_sha256(self):
92
94
        return compute_file_hash(hashlib.sha256, self.filename)