def test_number_should_be_encoded(self):
     result = decode_to_unicode(42)
     self.assertEquals(result, "42")
 def test_none_should_be_returned_unchanged(self):
     result = decode_to_unicode(None)
     self.assertTrue(result is None)
 def test_unknown_encoding_should_not_raise_error(self):
     result = decode_to_unicode(b'A m\x9b\x9bse once bit my sister')
     self.assertTrue(isinstance(result, six.text_type))
 def test_utf_8_encoded_ifalias_should_be_properly_decoded(self):
     result = decode_to_unicode(b'A m\xc3\xb8\xc3\xb8se once bit my sister')
     expected = u'A m\xf8\xf8se once bit my sister'
     self.assertEquals(result, expected)
 def test_number_should_be_encoded(self):
     result = decode_to_unicode(42)
     self.assertEquals(result, "42")
 def test_unknown_encoding_should_not_raise_error(self):
     result = decode_to_unicode('A m\x9b\x9bse once bit my sister')
     self.assertTrue(isinstance(result, unicode))
 def test_none_should_be_returned_unchanged(self):
     result = decode_to_unicode(None)
     self.assertTrue(result is None)
 def test_utf_8_encoded_ifalias_should_be_properly_decoded(self):
     result = decode_to_unicode('A m\xc3\xb8\xc3\xb8se once bit my sister')
     expected = u'A m\xf8\xf8se once bit my sister'
     self.assertEquals(result, expected)