Example #1
0
 def setUp(self):
     self.working_dir = tempfile.mkdtemp()
     self.tag = 'metadata'
     self.attributes = {'packages': '30'}
     self.context = XmlFileContext(
         os.path.join(self.working_dir, 'test.xml'), self.tag,
         self.attributes)
Example #2
0
 def test_init_with_no_properties(self, mock_generator):
     self.context = XmlFileContext(
         os.path.join(self.working_dir, 'test.xml'), self.tag)
     self.assertEquals(self.context.root_attributes, {})
     self.assertEquals(self.context.root_tag, 'metadata')