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)
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')