

def test_none(self):
    '\n        See #556. Make sure that PK fields with a value of 0 are actually set\n        to C{None}.\n        '
    alias = adapter.DjangoClassAlias(models.SimplestModel, None)
    x = models.SimplestModel()
    self.assertEqual(x.id, None)
    alias.applyAttributes(x, {
        'id': 0,
    })
    self.assertEqual(x.id, None)

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