'Test merge with virtual references'

def testMergeVirtualReference(self):

    utable = current.auth.settings.table_user
    user = Storage(first_name='Test', last_name='User', password='xyz', email='testuser@example.com', organisation_id=self.id2)
    user_id = utable.insert(**user)
    success = self.resource.merge(self.id1, self.id2)
    self.assertTrue(success)
    user = current.db((utable.id == user_id)).select(limitby=(0, 1)).first()
    self.assertNotEqual(user, None)
    self.assertEqual(str(user.organisation_id), str(self.id1))
