~ubuntu-branches/ubuntu/lucid/twisted-web2/lucid

« back to all changes in this revision

Viewing changes to twisted/web2/test/test_static.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-03-30 22:08:20 UTC
  • mfrom: (0.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080330220820-m2cd4jon35wz2efx
Tags: 8.0.1-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
 
124
124
    def test_compareFileContents(self):
125
125
        def gotFname(fname):
126
 
            contents = file(fname, 'r').read()
127
 
            self.assertEquals(contents, 'Test contents')
 
126
            contents = file(fname, 'rb').read()
 
127
            self.assertEquals(contents, 'Test contents\n')
128
128
 
129
129
        d = self.uploadFile('FileNameOne', 'myfilename', 'text/plain',
130
 
                            'Test contents')
 
130
                            'Test contents\n')
131
131
        d.addCallback(self.fileNameFromResponse)
132
132
        d.addCallback(gotFname)
133
133
        return d
 
134