def create_self_machine_account(self): email, password = self.app.config['AGENT_ACCOUNTS']['self'] self.db.accounts.insert( { 'role': 'superuser', 'token': 'QYADFBPNZZDFJEWAFGGF', 'databases': self.app.config['DATABASES'], '@type': 'Account', 'email': email, 'password': AccountDomain.encrypt_password(password) } )
def create_dummy_user(self): self.db.accounts.insert( { 'email': "[email protected]", 'password': AccountDomain.encrypt_password('1234'), 'role': 'admin', 'token': 'NOFATDNNUB', 'databases': self.app.config['DATABASES'], 'defaultDatabase': self.app.config['DATABASES'][0], '@type': 'Account' } ) self.account = self.db.accounts.find_one({'email': '[email protected]'})