'It is not possible to register more than one C{Application}.'

def test_cantRegisterTwice(self):

    reactor = gireactor.GIReactor(useGtk=False)
    self.addCleanup(self.unbuildReactor, reactor)
    app = Gio.Application(application_id='com.twistedmatrix.trial.gireactor', flags=Gio.ApplicationFlags.FLAGS_NONE)
    reactor.registerGApplication(app)
    app2 = Gio.Application(application_id='com.twistedmatrix.trial.gireactor2', flags=Gio.ApplicationFlags.FLAGS_NONE)
    exc = self.assertRaises(RuntimeError, reactor.registerGApplication, app2)
    self.assertEqual(exc.args[0], "Can't    register    more    than    one    application    instance.")
