diff --git a/unittests/test_structure_mapping.py b/unittests/test_structure_mapping.py index ca474588d96eef22790ac77ece5399c53a0017fd..62f8ff4aeeaa83ae942a4049f1d2ceda5533ebf3 100644 --- a/unittests/test_structure_mapping.py +++ b/unittests/test_structure_mapping.py @@ -44,7 +44,6 @@ class structureMappingTest(unittest.TestCase): self.assertEqual(val, tar) def test_collect_existing_structure(self): - # Henrik: please do not overwrite defautl names; e.g. use `emap` emap = EntityMapping() reca1 = db.Record(name="Animals", id=100) reca2 = db.Record(name="Dogs", id=200) @@ -111,11 +110,11 @@ class structureMappingTest(unittest.TestCase): collect_existing_structure(recd1, recc1, emap2) # Test the correct assignment of the properties - self.assertTrue(recc2 is emap.to_existing[recd2._cuid]) - self.assertTrue(recc3 is emap.to_existing[recd3._cuid]) + self.assertTrue(recc2 is emap2.to_existing[recd2._cuid]) + self.assertTrue(recc3 is emap2.to_existing[recd3._cuid]) - self.assertTrue(recd2 is emap.to_target[recc2.id]) - self.assertTrue(recd3 is emap.to_target[recc3.id]) + self.assertTrue(recd2 is emap2.to_target[recc2.id]) + self.assertTrue(recd3 is emap2.to_target[recc3.id]) """ Test, if the Record `Cars` in `target_structure` have one additional Property """ # Test existing structure @@ -123,7 +122,7 @@ class structureMappingTest(unittest.TestCase): self.assertEqual(len(recd2.get_properties()), 2) # number of properties stay unchanged for prop_record, prop_em in zip(recc2.get_properties(), recd2.get_properties()): - self.assertTrue(prop_record is emap.to_existing[prop_em._cuid]) + self.assertTrue(prop_record is emap2.to_existing[prop_em._cuid]) # Test target structure self.assertEqual(len(recc3.get_properties()), 2) # number of properties stay unchanged