Browse Source

Merge pull request #122 from hbrunn/8.0-base_field_serialized-fix-test

[FIX] completely initialize the test model
pull/123/merge
Yannick Vaucher 10 years ago
parent
commit
921f6eaf84
  1. 9
      base_field_serialized/tests/test_serialized.py

9
base_field_serialized/tests/test_serialized.py

@ -31,8 +31,13 @@ class BaseFieldSerializedTestModel(models.Model):
class TestBaseFieldSerialized(TransactionCase):
def test_ReadWrite(self):
BaseFieldSerializedTestModel._build_model(self.registry, self.cr)
self.env['base.field.serialized.test.model']._auto_init()
record = self.env['base.field.serialized.test.model'].create(
testmodel = self.env['base.field.serialized.test.model']
testmodel._prepare_setup()
testmodel._setup_base(False)
testmodel._setup_fields()
testmodel._setup_complete()
testmodel._auto_init()
record = testmodel.create(
{'serialized': ['hello world']})
self.assertEqual(record.serialized, ['hello world'])
self.env.invalidate_all()

Loading…
Cancel
Save