~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rio.py

  • Committer: Martin Pool
  • Date: 2006-02-17 20:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060217204603-7cbfc062067a1c06
New Rio.as_dict method

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
                ['name: fred\n',
65
65
                 'number: 42\n'])
66
66
 
 
67
    def test_as_dict(self):
 
68
        """Convert rio Stanza to dictionary"""
 
69
        s = Stanza(number='42', name='fred')
 
70
        sd = s.as_dict()
 
71
        self.assertEquals(sd, dict(number='42', name='fred'))
 
72
 
67
73
    def test_to_file(self):
68
74
        """Write rio to file"""
69
75
        tmpf = TemporaryFile()