2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 """Tests for resource_loader."""
10 from tvcm import module
11 from tvcm import resource_loader
12 from tvcm import project as project_module
15 class ResourceLoaderTest(unittest.TestCase):
18 tvcm_project = project_module.Project()
19 loader = resource_loader.ResourceLoader(tvcm_project)
20 guid_module = loader.LoadModule(module_name='tvcm')
21 self.assertTrue(os.path.samefile(
23 os.path.join(tvcm_project.tvcm_src_path, 'tvcm.html')))
24 expected_contents = ''
25 with open(os.path.join(tvcm_project.tvcm_src_path, 'tvcm.html')) as f:
26 expected_contents = f.read()
27 self.assertEquals(guid_module.contents, expected_contents)
29 if __name__ == '__main__':