'Verify alias registration of link tables'

def testLinkTableRegistration(self):

    s3db = current.s3db
    resource = s3db.resource('test_master')
    assertIn = self.assertIn
    assertEqual = self.assertEqual
    links = resource.links
    assertIn('link', links)
    assertIn('parent__link', links)
    parent_link = links['parent__link']
    assertEqual(parent_link.fkey, 'child')
    assertIn('child__link', links)
    child_link = links['child__link']
    assertEqual(child_link.fkey, 'parent')
