コード例 #1
0
ファイル: test_metadata_writer.py プロジェクト: ipanova/pulp
 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)
コード例 #2
0
ファイル: test_metadata_writer.py プロジェクト: ipanova/pulp
 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')