예제 #1
0
 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)
예제 #2
0
    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()
예제 #3
0
def createDatabase(store):
    """
    Make an L{AMPConfiguration} in the given store.
    """
    installOn(AMPConfiguration(store=store), store)