

def test_dynamic(self):
    '\n        Test for dynamic property encoding.\n        '
    alias = adapter.DjangoClassAlias(models.SimplestModel, 'Book')
    x = models.SimplestModel()
    x.spam = 'eggs'
    self.assertEqual(alias.getEncodableAttributes(x), {
        'spam': 'eggs',
        'id': None,
    })
    alias.applyAttributes(x, {
        'spam': 'foo',
        'id': None,
    })
    self.assertEqual(x.spam, 'foo')

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