Exemplo n.º 1
0
 def create_update_build_xml(self, manifest, path=None):
     buildxml = android.BuildXml(None)
     buildxml._parse(
         FileMock(
             '<?xml version="1.0" encoding="UTF-8"?>\n'
             '<project name="libfplutil_test" default="help">\n'
             '</project>\n'))
     return buildxml
Exemplo n.º 2
0
 def test_buildxml_missing_project(self):
     f = FileMock('<not-project name="foo"/>')
     b = android.BuildXml(None)
     with self.assertRaises(common.ConfigurationError):
         b._parse(f)
Exemplo n.º 3
0
 def test_buildxml_parse_trivial(self):
     f = FileMock('<project name="foo"/>')
     b = android.BuildXml(None)
     b._parse(f)
     self.assertEqual(b.project_name, 'foo')
     self.assertIsNone(b.path)
Exemplo n.º 4
0
 def test_construct_buildxml(self):
     b = android.BuildXml(None)
     self.assertIsNone(b.path)
     self.assertIsNone(b.project_name)
     with self.assertRaises(common.ConfigurationError):
         android.BuildXml('/non existent/bogus_path')