

def test_add_console_does_not_duplicate(self):
    instance = self._create_instance()
    cons1 = cons1.console.add_console(self.context, instance['id'])
    cons2 = self.console.add_console(self.context, instance['id'])
    self.assertEqual(cons1, cons2)
    db.instance_destroy(self.context, instance['uuid'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/console/test_console.py ConsoleTestCase.test_add_console_does_not_duplicate/VarMisuse@20/29 `self`->`cons1`