def test_decode_python(self): data = OpaqueObject.decode(dumps(b"test"), Atom(b"python")) self.assertEqual(b"test", data)
def test_decode_python(self): data = OpaqueObject.decode(dumps("test"), Atom("python")) self.assertEqual("test", data)
def test_decode(self): obj = OpaqueObject.decode(b"data", Atom(b"language")) self.assertEqual(b"data", obj.data) self.assertEqual(b"language", obj.language)
def test_decode(self): obj = OpaqueObject.decode("data", Atom("language")) self.assertEqual("data", obj.data) self.assertEqual("language", obj.language)