python/tests: add test for generated and duplicate linkIDs