|
|
|
|
25
|
model = Model(EmBackendJson('EditorialModel/test/me.json'))
|
25
|
model = Model(EmBackendJson('EditorialModel/test/me.json'))
|
26
|
self.assertTrue(isinstance(model, Model))
|
26
|
self.assertTrue(isinstance(model, Model))
|
27
|
|
27
|
|
28
|
- model = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler=DummyMigrationHandler('LodelTestInstance'))
|
|
|
|
|
28
|
+ model = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler=DummyMigrationHandler())
|
29
|
self.assertTrue(isinstance(model, Model))
|
29
|
self.assertTrue(isinstance(model, Model))
|
30
|
|
30
|
|
31
|
def test_bad_init(self):
|
31
|
def test_bad_init(self):
|
|
|
|
|
286
|
def test_hash(self):
|
286
|
def test_hash(self):
|
287
|
""" Test that __hash__ and __eq__ work properly on models """
|
287
|
""" Test that __hash__ and __eq__ work properly on models """
|
288
|
me1 = Model(EmBackendJson('EditorialModel/test/me.json'))
|
288
|
me1 = Model(EmBackendJson('EditorialModel/test/me.json'))
|
289
|
- me2 = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler=DummyMigrationHandler('LodelTestInstance'))
|
|
|
|
|
289
|
+ me2 = Model(EmBackendJson('EditorialModel/test/me.json'), migration_handler=DummyMigrationHandler())
|
290
|
|
290
|
|
291
|
self.assertEqual(hash(me1), hash(me2), "When instanciate from the same backend & file but with another migration handler the hashes differs")
|
291
|
self.assertEqual(hash(me1), hash(me2), "When instanciate from the same backend & file but with another migration handler the hashes differs")
|
292
|
self.assertTrue(me1.__eq__(me2))
|
292
|
self.assertTrue(me1.__eq__(me2))
|