Beispiel #1
0
 def test_single(self):
     """
     Split a single header with no parameters.
     """
     self.assertThat(
         _splitHeaders(['foo']),
         Equals([('foo', {})]))
Beispiel #2
0
 def test_params(self):
     """
     Split header values containing parameters.
     """
     self.assertThat(
         _splitHeaders(['foo,bar;quux=1']),
         Equals([('foo', {}),
                 ('bar', {'quux': '1'})]))
Beispiel #3
0
 def test_multiple(self):
     """
     Split multiple headers with no parameters.
     """
     self.assertThat(
         _splitHeaders(['foo', 'bar']),
         Equals([('foo', {}),
                 ('bar', {})]))
Beispiel #4
0
 def test_commas(self):
     """
     Split a single header containing multiple values separated by commas
     with no parameters.
     """
     self.assertThat(
         _splitHeaders(['foo,bar']),
         Equals([('foo', {}),
                 ('bar', {})]))