ironfroggy/straight.plugin — pull request #15 by dustinlacewell (2013-09-06 15:13:53+00:00)
Title: Added static file helper

Example usage test-case:

class StaticFinderTestCase(LoaderTestCaseMixin, unittest.TestCase):

paths = (
os.path.join(os.path.dirname(__file__), 'test-packages', 'media-package'),
)

def setUp(self):
self.loader = loaders.ModuleLoader()
super(StaticFinderTestCase, self).setUp()

def test_load(self):
modules = self.loader.load('testplugin')
self.assertIsNotNone(modules.findFile('templates/bar.html'))
self.assertIsNone(modules.findFile('templates/err.html'))