def test_get_relation_id(self): relation = Relation(id=1, resolwe=MagicMock()) relation.id = 1 # this is overriden when initialized self.assertEqual(get_relation_id(relation), 1) self.assertEqual(get_relation_id(2), 2)