~ubuntu-branches/ubuntu/natty/moin/natty-security

« back to all changes in this revision

Viewing changes to MoinMoin/_tests/test_caching.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-07-24 23:50:51 UTC
  • Revision ID: james.westby@ubuntu.com-20080724235051-qzjvwmfslyahnjnx
Tags: 1.7.1-1
* New upstream release.  Closes: bug#492233, thanks to Teodor.
  + Fixes bogus empty page creation.  Closes: bug#489146, thanks to
    Sam Morris.
* Recommend python-xml, needed for RSS feeds.  Closes: bug#488777,
  thanks to Sam Morris.
* Add patch 10001 to disable RenderAsDocbook if python-xml is not
  available. Closes: bug#487741, thanks to Franklin Piat.
* Update cdbs snippets:
  + Move dependency cleanup to new local snippet package-relations.mk.
  + Update copyright-check output to more closely match proposed new
    copyright file format.
  + Update README.cdbs-tweaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        page._write_file(test_data2)
77
77
        assert cache.needsUpdate(page._text_filename())
78
78
 
 
79
    def test_filelike_readwrite(self):
 
80
        request = self.request
 
81
        key = 'nooneknowsit'
 
82
        arena = 'somethingfunny'
 
83
        data = "dontcare"
 
84
        cacheentry = caching.CacheEntry(request, arena, key, scope='wiki', do_locking=True,
 
85
                 use_pickle=False, use_encode=True)
 
86
        cacheentry.open(mode='w')
 
87
        cacheentry.write(data)
 
88
        cacheentry.close()
 
89
 
 
90
        assert cacheentry.exists()
 
91
 
 
92
        cacheentry.open(mode='r')
 
93
        rdata = cacheentry.read()
 
94
        cacheentry.close()
 
95
 
 
96
        assert data == rdata
79
97
 
80
98
coverage_modules = ['MoinMoin.caching']
81
99