

def test_no_pk(self):
    '\n        Ensure that Models without a primary key are correctly serialized.\n        See #691.\n        '
    instances = [models.NotSaved(name='a'), models.NotSaved(name='b')]
    encoded = pyamf.encode(instances, encoding=pyamf.AMF3).getvalue()
    decoded = pyamf.decode(encoded, encoding=pyamf.AMF3).next()
    self.assertEqual(decoded[0]['name'], 'a')
    self.assertEqual(decoded[1]['name'], 'b')

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/tests/adapters/test_django.py PKTestCase.test_no_pk/original