/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http_response.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-01 17:05:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1981.
  • Revision ID: john@arbash-meinel.com-20060901170501-6d5341072dce87e4
Use the regex, rather than stripping off the boundary later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
    def test_content_type_re(self):
148
148
        self.regex = response.HttpMultipartRangeResponse._CONTENT_TYPE_RE
149
 
        self.assertRegexMatches(('xxyyzz',),
 
149
        self.assertRegexMatches(('', 'xxyyzz'),
150
150
                                'multipart/byteranges; boundary = xxyyzz')
151
 
        self.assertRegexMatches(('xxyyzz',),
 
151
        self.assertRegexMatches(('', 'xxyyzz'),
152
152
                                'multipart/byteranges;boundary=xxyyzz')
153
 
        self.assertRegexMatches(('xx yy zz',),
 
153
        self.assertRegexMatches(('', 'xx yy zz'),
154
154
                                ' multipart/byteranges ; boundary= xx yy zz ')
 
155
        self.assertRegexMatches(('"', 'xx yy zz'),
 
156
                                ' multipart/byteranges ; boundary= "xx yy zz" ')
 
157
        self.assertEqual(None,
 
158
                         self.regex.match(
 
159
                             ' multipart/byteranges ; boundary= "xx yy zz '))
 
160
        self.assertEqual(None,
 
161
                         self.regex.match(
 
162
                             ' multipart/byteranges ; boundary= xx yy zz" '))
155
163
        self.assertEqual(None,
156
164
                self.regex.match('multipart byteranges;boundary=xx'))
157
165