Mercurial > treepkg
diff test/test_info.py @ 392:e2afbd3c2bf1 treepkg-status
write first info about tracks
author | Bjoern Ricks <bricks@intevation.de> |
---|---|
date | Thu, 08 Jul 2010 16:11:13 +0000 |
parents | 1af04bfbb1d0 |
children | 94a6ae627b31 |
line wrap: on
line diff
--- a/test/test_info.py Thu Jul 08 16:08:39 2010 +0000 +++ b/test/test_info.py Thu Jul 08 16:11:13 2010 +0000 @@ -14,17 +14,18 @@ test_dir = os.path.dirname(__file__) sys.path.append(os.path.join(test_dir, os.pardir)) -from treepkg.info.status import TreepkgInfo +from treepkg.info.status import * from treepkg.report import get_packager_group from filesupport import FileTestMixin -class TreepkgInfoExampleTest(unittest.TestCase, FileTestMixin): +class TreepkgInfoTest(unittest.TestCase, FileTestMixin): config_contents = """\ [DEFAULT] -treepkg_dir: /home/builder/mill -tracks_dir: %(treepkg_dir)s/tracks +#treepkg_dir: /home/builder/mill +#tracks_dir: %(treepkg_dir)s/tracks +tracks_dir: /home/builder/mill/tracks root_cmd: sudo -pbuilder_dir: %(treepkg_dir)s/pbuilder +pbuilder_dir: %(tracks_dir)s/pbuilder builderconfig: %(pbuilder_dir)s/pbuilderrc deb_email: treepkg@example.com deb_fullname: TreePKG @@ -32,7 +33,7 @@ handle_dependencies: False [treepkg] -instructions_file: %(treepkg_dir)s/instructions +instructions_file: %(tracks_dir)s/instructions check_interval: 3600 name: testtreepkginfo @@ -67,16 +68,16 @@ def test_createinfo(self): config_file = os.path.join(self.directory, "treepkg.cfg") - group = get_packager_group(config_file) - tpginfo = TreepkgInfo(group.name) - print tpginfo.toxml().toxml() - self.assertEquals("testtreepkginfo", tpginfo.name) + tpkginfo = TreepkgInfo(config_file) + print tpkginfo.toxml().toxml() + tpkgroot = tpkginfo.tpkgroot + self.assertEquals("testtreepkginfo", tpkgroot.name) -class TreepkgInfoTest(unittest.TestCase): +class TreepkgRootInfoTest(unittest.TestCase): def test_toxml(self): - status = TreepkgInfo("testtreepkg") + status = TreepkgRootInfo("testtreepkg") dom = status.toxml() xml = dom.toxml() self.assertEquals("<status><name>testtreepkg</name></status>", xml)