(self)
| 176 | self._testNonStringPropertyKey(symbol('abcdef')) |
| 177 | |
| 178 | def testBinaryPropertyKey(self): |
| 179 | if version_info[0] > 2: |
| 180 | # Py3: Binary conversions not supported |
| 181 | self._testNonStringPropertyKey(b'abc123') |
| 182 | else: |
| 183 | # Py2: Check for correct key conversion |
| 184 | self.msg.properties = {'abc': 123, b'def': 456} |
| 185 | data = self.msg.encode() |
| 186 | |
| 187 | msg2 = Message() |
| 188 | msg2.decode(data) |
| 189 | |
| 190 | assert msg2.properties == self.msg.properties |
| 191 | for k in msg2.properties: |
| 192 | assert type(k) is unicode, 'non-string key %s %s' % (k, type(k)) |
| 193 | |
| 194 | def testAnnotationsSymbolicAndUlongKey(self, a=None): |
| 195 | if a is None: |
nothing calls this directly
no test coverage detected