# Path: axiom/userbase.py
# class LoginSystem(Item, LoginBase, SubStoreLoginMixin):
#     schemaVersion = 1
#     typeName = 'login_system'
# 
#     loginCount = integer(default=0)
#     failedLogins = integer(default=0)
#     _txCryptContext = inmemory()
# 
# Path: axiom/dependency.py
# def installOn(self, target):
#     """
#     Install this object on the target along with any powerup
#     interfaces it declares. Also track that the object now depends on
#     the target, and the object was explicitly installed (and therefore
#     should not be uninstalled by subsequent uninstallation operations
#     unless it is explicitly removed).
#     """
#     _installOn(self, target, True)
# 
# Path: axiom/test/test_userbase.py
# class GarbageProtocolHandler(Item):
#     schemaVersion = 1
#     typeName = 'test_login_garbage'
# 
#     garbage = integer()


from axiom.userbase import LoginSystem
from axiom.dependency import installOn
from axiom.test.historic.stubloader import saveStub
from axiom.test.test_userbase import GarbageProtocolHandler


def createDatabase(s):
    ls = LoginSystem(store=s)
    installOn(ls, s)
    acc = ls.addAccount(u'test', u'example.com', u'asdf')
    ss = acc.avatars.open()

# Path: axiom/userbase.py
# class LoginSystem(Item, LoginBase, SubStoreLoginMixin):
#     schemaVersion = 1
#     typeName = 'login_system'
# 
#     loginCount = integer(default=0)
#     failedLogins = integer(default=0)
#     _txCryptContext = inmemory()
# 
# Path: axiom/dependency.py
# def installOn(self, target):
#     """
#     Install this object on the target along with any powerup
#     interfaces it declares. Also track that the object now depends on
#     the target, and the object was explicitly installed (and therefore
#     should not be uninstalled by subsequent uninstallation operations
#     unless it is explicitly removed).
#     """
#     _installOn(self, target, True)
# 
# Path: axiom/test/test_userbase.py
# class GarbageProtocolHandler(Item):
#     schemaVersion = 1
#     typeName = 'test_login_garbage'
# 
#     garbage = integer()


# Path: axiom/test/historic/stub_account2to3.py
from axiom.userbase import LoginSystem
from axiom.dependency import installOn
from axiom.test.historic.stubloader import saveStub
from axiom.test.test_userbase import GarbageProtocolHandler



def createDatabase(s):
    ls = LoginSystem(store=s)
    installOn(ls, s)
    acc = ls.addAccount(u'test', u'example.com', u'asdf')
    ss = acc.avatars.open()

    gph = GarbageProtocolHandler(store=ss, garbage=7)