def setUp(self): """ Create an in-memory L{Store} with an L{AMPConfiguration} in it. """ self.store = Store() self.conf = AMPConfiguration(store=self.store) installOn(self.conf, self.store)
def setUp(self): """ Create an in-memory L{Store} with an L{AMPConfiguration} in it, and a substore. """ self.store = Store() self.conf = AMPConfiguration(store=self.store) installOn(self.conf, self.store) self.localpart = u'alice' self.domain = u'example.org' self.password = u'foobar' loginSystem = self.store.findUnique(LoginSystem) account = loginSystem.addAccount(self.localpart, self.domain, self.password, internal=True) self.subStore = account.avatars.open()
def createDatabase(store): """ Make an L{AMPConfiguration} in the given store. """ installOn(AMPConfiguration(store=store), store)