

def test_encodable_attrs(self):

    def attrs():
        return self.alias.getEncodableAttributes(self.model)
    self.assertEqual(attrs(), {
        'id': None,
    })
    x = models.SimplestModel()
    x.save()
    self.addCleanup(x.delete)
    self.model.bar = x
    self.assertEqual(attrs(), {
        'id': None,
        'bar': x,
    })

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