diff options
Diffstat (limited to 'tests/test_manifest_xml.py')
| -rw-r--r-- | tests/test_manifest_xml.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 85c20733..48403c0d 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py | |||
| @@ -252,6 +252,37 @@ class XmlManifestTests(ManifestParseTestCase): | |||
| 252 | '<manifest></manifest>') | 252 | '<manifest></manifest>') |
| 253 | self.assertEqual(manifest.ToDict(), {}) | 253 | self.assertEqual(manifest.ToDict(), {}) |
| 254 | 254 | ||
| 255 | def test_toxml_omit_local(self): | ||
| 256 | """Does not include local_manifests projects when omit_local=True.""" | ||
| 257 | manifest = self.getXmlManifest( | ||
| 258 | '<?xml version="1.0" encoding="UTF-8"?><manifest>' | ||
| 259 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
| 260 | '<project name="p" groups="local::me"/>' | ||
| 261 | '<project name="q"/>' | ||
| 262 | '<project name="r" groups="keep"/>' | ||
| 263 | '</manifest>') | ||
| 264 | self.assertEqual( | ||
| 265 | manifest.ToXml(omit_local=True).toxml(), | ||
| 266 | '<?xml version="1.0" ?><manifest>' | ||
| 267 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
| 268 | '<project name="q"/><project name="r" groups="keep"/></manifest>') | ||
| 269 | |||
| 270 | def test_toxml_with_local(self): | ||
| 271 | """Does include local_manifests projects when omit_local=False.""" | ||
| 272 | manifest = self.getXmlManifest( | ||
| 273 | '<?xml version="1.0" encoding="UTF-8"?><manifest>' | ||
| 274 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
| 275 | '<project name="p" groups="local::me"/>' | ||
| 276 | '<project name="q"/>' | ||
| 277 | '<project name="r" groups="keep"/>' | ||
| 278 | '</manifest>') | ||
| 279 | self.assertEqual( | ||
| 280 | manifest.ToXml(omit_local=False).toxml(), | ||
| 281 | '<?xml version="1.0" ?><manifest>' | ||
| 282 | '<remote name="a" fetch=".."/><default remote="a" revision="r"/>' | ||
| 283 | '<project name="p" groups="local::me"/>' | ||
| 284 | '<project name="q"/><project name="r" groups="keep"/></manifest>') | ||
| 285 | |||
| 255 | def test_repo_hooks(self): | 286 | def test_repo_hooks(self): |
| 256 | """Check repo-hooks settings.""" | 287 | """Check repo-hooks settings.""" |
| 257 | manifest = self.getXmlManifest(""" | 288 | manifest = self.getXmlManifest(""" |
